Adds login and logout and some buttons.
This commit is contained in:
1 parent
96bacb586d
commit
59bf27b5ab
8 files changed
+94
-19
No files matched your search
+1
-17
@@ -4,21 +4,5 @@
|
||||
{%endblock%}
|
||||
|
||||
{%block content%}
|
||||
<section id="register">
|
||||
<div id="user">
|
||||
Selg til:
|
||||
{% for user in users %}
|
||||
<button id="{{ user }}">{{ user }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="products">
|
||||
Vi selger:<br />
|
||||
{% for product in products %}
|
||||
<button id="{{ product.id }}">+ {{ product.name }}</button>
|
||||
<button id="{{ product.id }}">- {{ product.name }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="total">Totalt: <span class="total_text"></span></div>
|
||||
<button id="submit">Kjøp</button>
|
||||
</section>
|
||||
<a href="/register/">Kasse</a>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,29 @@
|
||||
{% extends "base.html" %}
|
||||
{%block header%}
|
||||
<h1>Biceps Bar System</h1>
|
||||
{%endblock%}
|
||||
|
||||
{%block content%}
|
||||
<section id="nav">
|
||||
<ul>
|
||||
<li><a href="{% url main.views.logout %}">Logout</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="register">
|
||||
<div id="user">
|
||||
Selg til:
|
||||
{% for user in users %}
|
||||
<button id="{{ user }}">{{ user }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="products">
|
||||
Vi selger:<br />
|
||||
{% for product in products %}
|
||||
<button id="{{ product.id }}">+ {{ product.name }}</button>
|
||||
<button id="{{ product.id }}">- {{ product.name }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="total">Totalt: <span class="total_text"></span></div>
|
||||
<button id="submit">Kjøp</button>
|
||||
</section>
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Logg inn{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include "registration/login_form.html" %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,20 @@
|
||||
{% if form.errors %}
|
||||
<p>Brukernavn og passord stemmer ikke overens. Prøv igjen.</p>
|
||||
{% endif %}
|
||||
|
||||
<form method="post" action="{% url django.contrib.auth.views.login %}" class="bp">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tr>
|
||||
<th><label for="id_username">Brukernavn:</label></th>
|
||||
<td>{{ form.username }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><label for="id_password">Passord: </label></th>
|
||||
<td>{{ form.password }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<input type="submit" value="Logg inn" />
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
</form>
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Logg inn{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
Du er logget ut. Vil du <a href="{% url main.views.home %}">logge inn igjen</a>.
|
||||
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user