[TASK] Wrap login and logout for proper templateing.
This commit is contained in:
1 parent
b233e3ea90
commit
134d7288a0
7 files changed
+92
-29
No files matched your search
@@ -6,7 +6,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="Merging Citavi projects and mapping existing datasets.">
|
||||
<title>{% block title %}{{page_name}} :: {{page_title}}{% endblock %}</title>
|
||||
<title>{% block title %}{{page.name}} :: {{page.title}}{% endblock %}</title>
|
||||
<!-- Bootstrap -->
|
||||
{% compressed_css 'bootstrap' %}
|
||||
{% compressed_js 'bootstrap' %}
|
||||
@@ -16,18 +16,24 @@
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="/">{{page_name}}</a>
|
||||
<a class="navbar-brand" href="/">{{page.name}}</a>
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Index</a></li>
|
||||
<li><a href="/register">Register</a></li>
|
||||
<li><a href="/login">Login</a></li>
|
||||
<li>
|
||||
{% if user.is_anonymous %}
|
||||
<a href="/login">Login</a>
|
||||
{% else %}
|
||||
<a href="/logout">Logout</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="page-header">
|
||||
<div id="header" class="container">
|
||||
<h1>{{page_title}}</h1>
|
||||
<h1>{{page.title}}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content" class="container">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/base.html" %}
|
||||
{% block content %}
|
||||
<p>
|
||||
REGISTER FORM HERE
|
||||
Please register here.
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout/base.html" %}
|
||||
{% block content %}
|
||||
<p>
|
||||
LOGIN FORM HERE
|
||||
You are logged out. Goodbye!
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% extends "layout/base.html" %}
|
||||
{% block content %}
|
||||
{% if form.errors %}
|
||||
<p>Your username and password did not match. Please try again.</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<form method="POST" action="{% url 'frontend-login' %}">
|
||||
{% csrf_token %}
|
||||
{{form.username.label_tag}} {{form.username}}<br>
|
||||
{{form.password.label_tag}} {{form.password}}
|
||||
<input type="submit" value="login" />
|
||||
<input type="hidden" name="next" value="{{next}}" />
|
||||
</form>
|
||||
</p>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user