mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-30 13:51:58 +00:00
7c10fc5e39
Used modified versions of django-registration and django-profiles , both on bitbucket. The Person model is now set up as the profile for auth.User s. I set up a requestcontext so that settings is automatically passed to every template, no need to repeat ourselves in views. However, this needs to be refined: I will soon change it to only pass a subset of settings. E.G. we do not need to be passing the DB login and password!
56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}
|
|
registration_form.html | {{ block.super }}
|
|
{% endblock %}
|
|
|
|
{% block header %}
|
|
<h1>registration_form.html</h1>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<form action="{% url registration_register %}" method="POST">
|
|
<table>
|
|
<tr>
|
|
<td align="right" valign="top">Username:</td>
|
|
<td>
|
|
{{ form.username }} <br/>
|
|
{% for error in form.username.errors %}
|
|
<span style="color:red">{{ error }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top">Email:</td>
|
|
<td>
|
|
{{ form.email }} <br/>
|
|
{% for error in form.email.errors %}
|
|
<span style="color:red">{{ error }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top">Password:</td>
|
|
<td>
|
|
{{ form.password1 }} <br/>
|
|
{% for error in form.password1.errors %}
|
|
<span style="color:red">{{ error }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right" valign="top">Password (again):</td>
|
|
<td>
|
|
{{ form.password2 }} <br/>
|
|
{% for error in form.password2.errors %}
|
|
<span style="color:red">{{ error }}</span>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td> </td>
|
|
<td><input type="submit" value="Register" /></td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
{% endblock %} |