Commit 4322aabe authored by BERJON Matthieu's avatar BERJON Matthieu

Add complete user registration management

I added all the files necessary to handle user registration as well as
password change.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent c6c17772
......@@ -6,8 +6,8 @@ urlpatterns = [
url(r'^$', views.index, name="poc_home"),
url(r'^apps/$', views.WebappList.as_view(), name='webapp_list'),
url(r'^jobs/$', views.JobList.as_view(), name='job_list'),
url('^auth/', include('django.contrib.auth.urls')),
# Registration
url('^auth/', include('django.contrib.auth.urls')),
url(r'^auth/signup/$', views.SignUp.as_view(), name='signup'),
]
......@@ -11,4 +11,9 @@
</div>
<button class="btn btn-primary" type="submit">Login</button>
</form>
<p><a href="{% url 'signup' %}">Register</a> - <a href="{% url 'password_reset' %}">Forgot your password?</a></p>
{% comment %}
<p><a href="{% url password_reset %}">Forgot your password?</a></p>
{% endcomment %}
{% endblock %}
{% extends 'base.html' %}
{% block title %}Password reset complete{% endblock %}
{% block content %}
<p>
Your password has been set. You may go ahead and <a href="{% url 'login' %}">log in</a> now.
</p>
{% endblock %}
{% extends 'base.html' %}
{% block title %}Change your password{% endblock %}
{% block content %}
{% if validlink %}
<h2>Change password</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Change password</button>
</form>
{% else %}
<p>
The password reset link was invalid, possibly because it has already been used.
Please request a new password reset.
</p>
{% endif %}
{% endblock %}
{% extends 'base.html' %}
{% block title %}Email sent{% endblock %}
{% block content %}
<p>
We've emailed you instructions for setting your password, if an account
exists with the email you entered. You should receive them shortly.
</p>
<p>
If you don't receive an email, please make sure you've entered the address
you registered with, and check your spam folder.
</p>
{% endblock %}
{% autoescape off %}
To initiate the password reset process for your {{ user.get_username }} A||go Account,
click the link below:
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
If clicking the link above doesn't work, please copy and paste the URL in a new browser
window instead.
Sincerely,
The A||go Team
{% endautoescape %}
{% extends 'base.html' %}
{% block title %}Reset your password{% endblock %}
{% block content %}
<h2>Forgot password</h2>
<form method="post">
{% csrf_token %}
<div class="form-group">
{{ form.as_p }}
</div>
<button class="btn btn-primary" type="submit">Submit</button>
</form>
{% endblock %}
......@@ -21,8 +21,7 @@ TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
# EMAILS
# ------------------------------------------------------------------------------
EMAILS_BACKEND = env('DJANGO_EMAIL_BACKEND', default='django.core.mail.backends.console.EmailBackend')
EMAIL_HOST = 'localhost'
EMAIL_PORT = 1025
# EMAILS_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# MY STUFF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment