Added very basic and not-very-secure authentication. Smeagol is now usable.

This commit is contained in:
Simon Brooke 2014-11-11 12:24:44 +00:00
parent d437f07fc2
commit fc89b25a2f
12 changed files with 140 additions and 32 deletions

View file

@ -0,0 +1,33 @@
{% extends "templates/base.html" %}
{% block content %}
<div id="header" class="wiki">
<h1>{{title}}</h1>
{{header|safe}}
</div>
<div id="left-bar" class="wiki">
{{left-bar|safe}}
</div>
<div id="content" class="wiki">
<form action="{{servlet-context}}/auth" method="POST">
{% if user %}
<p class="widget">
<label for="submit">To finish editing</label>
<input name="action" id="action" type="submit" class="action-dangerous" value="Logout!"/>
</p>
{% else %}
<p class="widget">
<label for="username">Your username</label>
<input name="username" id="username" type="text"/>
</p>
<p class="widget">
<label for="password">Your password</label>
<input name="password" id="password" type="password"/>
</p>
<p class="widget">
<label for="submit">To edit this wiki</label>
<input name="action" id="action" type="submit" class="action" value="Login!"/>
</p>
{% endif %}
</form>
</div>
{% endblock %}