Created very basic initial login / logout functionality. Absolutely rudimentary templates included.
This commit is contained in:
		@@ -0,0 +1,17 @@
 | 
			
		||||
{% extends 'global.html'%}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
# {% block title %}Start{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block maincontent %}
 | 
			
		||||
 | 
			
		||||
{% if user.is_authenticated %}
 | 
			
		||||
  Hi {{ user.username }}!
 | 
			
		||||
  <p><a href="{% url 'logout' %}">logout</a></p>
 | 
			
		||||
{% else %}
 | 
			
		||||
  <p>Du bist nicht eingeloggt.</p>
 | 
			
		||||
  <a href="{% url 'login' %}">login</a> |
 | 
			
		||||
  <a href="{% url 'signup' %}">signup</a>
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% endblock maincontent %}
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
{% extends 'global.html'%}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
# {% block title %}Login{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block maincontent %}
 | 
			
		||||
 | 
			
		||||
<h2>Login</h2>
 | 
			
		||||
<form method="post">
 | 
			
		||||
  {% csrf_token %}
 | 
			
		||||
  {{ form.as_p }}
 | 
			
		||||
  <button type="submit">Login</button>
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
{% endblock maincontent %}
 | 
			
		||||
@@ -0,0 +1,15 @@
 | 
			
		||||
{% extends 'global.html'%}
 | 
			
		||||
{% load static %}
 | 
			
		||||
 | 
			
		||||
# {% block title %}Registrierung{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block maincontent %}
 | 
			
		||||
 | 
			
		||||
<h2>Registrierung</h2>
 | 
			
		||||
<form method="post">
 | 
			
		||||
  {% csrf_token %}
 | 
			
		||||
  {{ form.as_p }}
 | 
			
		||||
  <button type="submit">Sign up</button>
 | 
			
		||||
</form>
 | 
			
		||||
 | 
			
		||||
{% endblock maincontent %}
 | 
			
		||||
		Reference in New Issue
	
	Block a user