Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrade django-registration.

  • Loading branch information...
commit 7b5c493bd7da50efe4110730a55f88064b73c2bb 1 parent 4e6d0c0
@aaugustin aaugustin authored
View
17 accounts/urls.py
@@ -1,14 +1,21 @@
from __future__ import absolute_import
from django.conf.urls import patterns, url, include
+from django.contrib.auth import views as auth_views
+
from registration.forms import RegistrationFormUniqueEmail
+from registration import views as registration_views
+
from . import views as account_views
urlpatterns = patterns('',
url(
r'^register/$',
- "registration.views.register",
- {'form_class': RegistrationFormUniqueEmail},
+ registration_views.register,
+ {
+ 'backend': 'registration.backends.default.DefaultBackend',
+ 'form_class': RegistrationFormUniqueEmail,
+ },
name='registration_register',
),
url(
@@ -18,13 +25,13 @@
),
url(
r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
- 'django.contrib.auth.views.password_reset_confirm',
+ auth_views.password_reset_confirm,
name='auth_password_reset_confim',
),
url(
r'^reset/done/$',
- 'django.contrib.auth.views.password_reset_complete'
+ auth_views.password_reset_complete,
),
url(r'^_trac/userinfo/$', account_views.json_user_info),
- (r'', include('registration.urls')),
+ url(r'', include('registration.backends.default.urls')),
)
View
3  deploy-requirements.txt
@@ -4,7 +4,8 @@ akismet == 0.2.0
Django >= 1.4, < 1.5
django-haystack == 1.1.0
django-push == 0.4
-django-registration == 0.7
+# django-registration doesn't have a release compatible with Django 1.5 yet
+-e hg+https://bitbucket.org/jscott1971/django-registration@b963cb9#egg=django-registration
django-secure == 0.1.0
docutils >= 0.6, < 0.7
feedparser==5.1.1
View
18 templates/registration/activate.html
@@ -1,16 +1,12 @@
{% extends "registration/base.html" %}
-{% block title %}Account activated{% endblock %}
+{% block title %}Account activation failed{% endblock %}
{% block content %}
- <h1>Account activated.</h1>
+ <h1>Account activation failed.</h1>
{% load humanize %}
- {% if account %}
- <p>Thanks for signing up! Now you can <a href="/accounts/login/">log in</a>.</p>
- {% else %}
- <p>Sorry, it didn't work. Either your activation link was incorrect, or
- the activation key for your account has expired; activation keys are
- only valid for {{ expiration_days|apnumber }} days after
- registration.</p>
- {% endif %}
-{% endblock %}
+ the activation key for your account has expired; activation keys are
+ only valid for {{ expiration_days|apnumber }} days after
+ registration.</p>
+{% endblock %}
View
8 templates/registration/activation_complete.html
@@ -0,0 +1,8 @@
+{% extends "registration/base.html" %}
+
+{% block title %}Account activated{% endblock %}
+
+{% block content %}
+ <h1>Account activated.</h1>
+ <p>Thanks for signing up! Now you can <a href="/accounts/login/">log in</a>.</p>
+{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.