euscanwww: included django-registration and tweaked templates
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
4246c544ad
commit
d34a0c4992
@ -52,6 +52,15 @@
|
|||||||
<li>---</li>
|
<li>---</li>
|
||||||
<li><a href="{% url "api" %}">API</a></li>
|
<li><a href="{% url "api" %}">API</a></li>
|
||||||
<li><a href="{% url "about" %}">About</a></li>
|
<li><a href="{% url "about" %}">About</a></li>
|
||||||
|
<li>---</li>
|
||||||
|
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
<li><a href="#"> Welcome {{ user }}</a></li>
|
||||||
|
<li><a href="{% url "django.contrib.auth.views.logout" %}">Logout</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><a href="{% url "django.contrib.auth.views.login" %}">Login</a></li>
|
||||||
|
<li><a href="{% url "registration.views.register" %}">Register</a></li>
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
{% extends "_base.html" %}
|
13
euscanwww/djeuscan/templates/registration/activate.html
Normal file
13
euscanwww/djeuscan/templates/registration/activate.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}{% if account %}Activation complete{% else %}Activation problem{% endif %}{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% if account %}
|
||||||
|
Thanks {{ account }}, activation complete! You may now <a href='{% url auth_login %}'>login</a>
|
||||||
|
using the username and password you set at registration.
|
||||||
|
{% else %}
|
||||||
|
Oops – it seems that your activation key is invalid.
|
||||||
|
Please check the url again.
|
||||||
|
{% endif %}
|
||||||
|
{% endblock %}
|
@ -0,0 +1,6 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% block title %}Activation complete{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
Thanks, activation complete! You may now <a href='{% url auth_login %}'>login</a>
|
||||||
|
using the username and password you set at registration.
|
||||||
|
{% endblock %}
|
@ -0,0 +1,11 @@
|
|||||||
|
You (or someone pretending to be you) have asked to register an account at
|
||||||
|
{{ site.name }}. If this wasn't you, please ignore this email
|
||||||
|
and your address will be removed from our records.
|
||||||
|
|
||||||
|
To activate this account, please click the following link within the next
|
||||||
|
{{ expiration_days }} days:
|
||||||
|
|
||||||
|
http://{{site.domain}}{% url registration_activate activation_key %}
|
||||||
|
|
||||||
|
Sincerely,
|
||||||
|
{{ site.name }} Management
|
@ -0,0 +1 @@
|
|||||||
|
Account registration for {{ site.name }}
|
28
euscanwww/djeuscan/templates/registration/login.html
Normal file
28
euscanwww/djeuscan/templates/registration/login.html
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% load url from future %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
{% if form.errors %}
|
||||||
|
<p>Your username and password didn't match. Please try again.</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td>{{ form.username.label_tag }}</td>
|
||||||
|
<td>{{ form.username }}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>{{ form.password.label_tag }}</td>
|
||||||
|
<td>{{ form.password }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<input type="submit" value="login" />
|
||||||
|
<input type="hidden" name="next" value="/" />
|
||||||
|
</form>
|
||||||
|
|
||||||
|
{% endblock %}
|
13
euscanwww/djeuscan/templates/registration/logout.html
Normal file
13
euscanwww/djeuscan/templates/registration/logout.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
|
||||||
|
<p>You're logged out."</p>
|
||||||
|
<p>Redirect...</p>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
window.location.href = "/";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endblock %}
|
@ -0,0 +1,6 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% block title %}Password changed{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
Password successfully changed!
|
||||||
|
{% endblock %}
|
@ -0,0 +1,16 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% block title %}Change password{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<form method='post' action=''>{% csrf_token %}
|
||||||
|
<table>
|
||||||
|
{{ form }}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<input type='submit' value="Change password" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -0,0 +1,7 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Password reset complete{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
Your password has been reset! You may now <a href="{{ login_url }}">log in</a>.
|
||||||
|
{% endblock %}
|
@ -0,0 +1,15 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% block title %}Confirm password reset{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
Enter your new password below to reset your password:
|
||||||
|
<form method="post" action="">{% csrf_token %}
|
||||||
|
<table>
|
||||||
|
{{ form.as_table }}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><input type="submit" value="Set password" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -0,0 +1,10 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Password reset{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<p>
|
||||||
|
We have sent you an email with a link to reset your password. Please check
|
||||||
|
your email and click the link to continue.
|
||||||
|
</p>
|
||||||
|
{% endblock %}
|
@ -0,0 +1,16 @@
|
|||||||
|
Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %},
|
||||||
|
|
||||||
|
You are receiving this email because you (or someone pretending to be you)
|
||||||
|
requested that your password be reset on the {{ domain }} site. If you do not
|
||||||
|
wish to reset your password, please ignore this message.
|
||||||
|
|
||||||
|
To reset your password, please click the following link, or copy and paste it
|
||||||
|
into your web browser:
|
||||||
|
|
||||||
|
{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uid token %}
|
||||||
|
|
||||||
|
Your username, in case you've forgotten: {{ user.username }}
|
||||||
|
|
||||||
|
|
||||||
|
Best regards,
|
||||||
|
{{ site_name }} Management
|
@ -0,0 +1,18 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}Reset password{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
Forgot your password? Enter your email in the form below and we'll send you
|
||||||
|
instructions for creating a new one.
|
||||||
|
|
||||||
|
<form method='post' action=''>{% csrf_token %}
|
||||||
|
<table>
|
||||||
|
{{ form }}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><input type='submit' value="Reset password" /></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
@ -0,0 +1,6 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
{% block title %}Activation email sent{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
An activation email has been sent. Please check your email and click on the link to activate your account.
|
||||||
|
{% endblock %}
|
@ -0,0 +1,19 @@
|
|||||||
|
{% extends "registration/_registration_base.html" %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
Register for an account
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<table>
|
||||||
|
<form method='post' action=''>{% csrf_token %}
|
||||||
|
{{ form }}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td>
|
||||||
|
<input type="submit" value="Send activation email" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
@ -170,6 +170,7 @@ INSTALLED_APPS = (
|
|||||||
# 'django.contrib.admindocs',
|
# 'django.contrib.admindocs',
|
||||||
'south',
|
'south',
|
||||||
'djcelery',
|
'djcelery',
|
||||||
|
'registration',
|
||||||
)
|
)
|
||||||
|
|
||||||
# A sample logging configuration. The only tangible logging
|
# A sample logging configuration. The only tangible logging
|
||||||
@ -201,6 +202,7 @@ LOGGING = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ACCOUNT_ACTIVATION_DAYS = 7
|
||||||
|
|
||||||
PORTAGE_ROOT = "/usr/portage/"
|
PORTAGE_ROOT = "/usr/portage/"
|
||||||
PORTAGE_CONFIGROOT = PORTAGE_ROOT
|
PORTAGE_CONFIGROOT = PORTAGE_ROOT
|
||||||
|
@ -10,6 +10,7 @@ urlpatterns = patterns('',
|
|||||||
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
|
|
||||||
url(r'^admin/', include(admin.site.urls)),
|
url(r'^admin/', include(admin.site.urls)),
|
||||||
|
url(r'^accounts/', include('registration.backends.default.urls')),
|
||||||
url(r'^', include('djeuscan.urls')),
|
url(r'^', include('djeuscan.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
3
setup.py
3
setup.py
@ -89,7 +89,8 @@ setup(
|
|||||||
),
|
),
|
||||||
install_requires=['Django==1.4', 'django-annoying==0..7.6', 'South==0.7.4',
|
install_requires=['Django==1.4', 'django-annoying==0..7.6', 'South==0.7.4',
|
||||||
'django-piston==0.2.3', 'BeautifulSoup==3.2.1',
|
'django-piston==0.2.3', 'BeautifulSoup==3.2.1',
|
||||||
'matplotlib==1.1.0', 'django-celery==2.5.5'],
|
'matplotlib==1.1.0', 'django-celery==2.5.5',
|
||||||
|
'django-registration==0.8'],
|
||||||
package_dir={'': 'pym'},
|
package_dir={'': 'pym'},
|
||||||
packages=packages,
|
packages=packages,
|
||||||
package_data={},
|
package_data={},
|
||||||
|
Loading…
Reference in New Issue
Block a user