Add a missing template

This commit is contained in:
Skia 2015-11-26 11:27:52 +01:00
parent 431b81cd42
commit 385f91a9db
3 changed files with 30 additions and 4 deletions

View File

@ -0,0 +1,15 @@
{% extends "core/base.html" %}
{% block content %}
<h2>Password reset sent</h2>
<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 %}

View File

@ -39,6 +39,7 @@ class PagePropView(UpdateView):
def get_object(self):
page_name = self.kwargs['page_name']
p = Page.get_page_by_full_name(page_name)
# Create the page if it does not exists
if p == None:
parent_name = '/'.join(page_name.split('/')[:-1])
name = page_name.split('/')[-1]

View File

@ -36,27 +36,37 @@ def password_change_done(request):
return views.password_change_done(request, template_name="core/password_change_done.html")
def password_reset(request):
"""
Allows someone to enter an email adresse for resetting password
"""
return views.password_reset(request,
template_name="core/password_reset.html",
email_template_name="core/password_reset_email.html",
post_reset_redirect="core:password_reset",
post_reset_redirect="core:password_reset_done",
)
def password_reset_done(request):
return views.password_reset_done(request)
pass
"""
Confirm that the reset email has been sent
"""
return views.password_reset_done(request, template_name="core/password_reset_done.html")
def password_reset_confirm(request, uidb64=None, token=None):
"""
Provide a reset password formular
"""
return views.password_reset_confirm(request, uidb64=uidb64, token=token,
post_reset_redirect="core:password_reset_complete",
template_name="core/password_reset_confirm.html",
)
def password_reset_complete(request):
"""
Confirm the password has sucessfully been reset
"""
return views.password_reset_complete(request,
template_name="core/password_reset_complete.html",
)
pass
def register(request):
context = {'title': 'Register a user'}