Initial commit

This commit is contained in:
2024-06-28 14:04:21 -04:00
commit 989da8396e
11 changed files with 247 additions and 0 deletions

15
templates/base.html Normal file
View File

@@ -0,0 +1,15 @@
<html>
<head>
<meta charset="utf-8">
<title>{% block title %}Django Auth{% endblock %}</title>
</head>
<body>
<main>
{% block content %}
{% endblock %}
</main>
</body>
</html>

12
templates/home.html Normal file
View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}Home{% endblock %}
{% block content %}
{% if user.is_authenticated %}
Hi {{ user.username }}!
{% else %}
<p>You are not logged in</p>
<a href="{% url 'login' %}">Log In</a>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block title %}Login{% endblock %}
{% block content %}
<h2>Log In</h2>
<form method="post">
{% csrf_token %}
{{ form }}
<button type="submit">Log In</button>
</form>
{% endblock %}