RANDOMSEC-19 #2

Merged
s470625 merged 12 commits from RANDOMSEC-19 into master 2022-01-25 16:47:25 +01:00
4 changed files with 59 additions and 0 deletions
Showing only changes of commit defafa6e4b - Show all commits

View File

@ -0,0 +1,18 @@
<!-- templates/base.html -->
<!DOCTYPE html>
<html>
<head>
{% load static %}
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="{% static 'base.css'%}">
<meta charset="utf-8">
<title>{% block title %}Auth{% endblock %}</title>
</head>
<body>
<main>
{% block content %}
{% endblock %}
</main>
</body>
</html>

View File

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

View File

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

View File

@ -0,0 +1,13 @@
<!-- templates/registration/signup.html -->
{% extends 'base.html' %}
{% block title %}Sign Up{% endblock %}
{% block content %}
<h2>Sign Up</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Sign Up</button>
</form>
{% endblock %}