[extensions-web/django/upgrade-1.8] django-registration: update to version 1.0.



commit d7aae5968e293f8b12e44269ea14b8d77815beb0
Author: Yuri Konotopov <ykonotopov gnome org>
Date:   Sun Oct 23 21:04:39 2016 +0300

    django-registration: update to version 1.0.
    
    This is breaks django-registration tests
    (http://www.mail-archive.com/django-users googlegroups com/msg78790.html)
    but safe to ignore because I can not reproduce this breakage with
    version 2.0 which is compatible with Django 1.7+.

 requirements.txt                                   |    2 +-
 .../auth/templates/registration/activate.html      |    2 +-
 .../registration/activation_complete.html          |    4 ++++
 sweettooth/auth/urls.py                            |    7 +++----
 4 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/requirements.txt b/requirements.txt
index 48b4aae..3f9d439 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,7 @@
 Django==1.4.22
 Pygments==1.6
 django-autoslug==1.4.1
-django-registration==0.7
+django-registration==1.0
 wsgiref==0.1.2
 South==0.7.6
 sorl-thumbnail
diff --git a/sweettooth/auth/templates/registration/activate.html 
b/sweettooth/auth/templates/registration/activate.html
index 6f7b4da..bae9ea0 100644
--- a/sweettooth/auth/templates/registration/activate.html
+++ b/sweettooth/auth/templates/registration/activate.html
@@ -1,4 +1,4 @@
 {% extends "base.html" %}
 {% block body %}
-Your account is now activated.
+Activation failed.
 {% endblock %}
diff --git a/sweettooth/auth/templates/registration/activation_complete.html 
b/sweettooth/auth/templates/registration/activation_complete.html
new file mode 100644
index 0000000..6f7b4da
--- /dev/null
+++ b/sweettooth/auth/templates/registration/activation_complete.html
@@ -0,0 +1,4 @@
+{% extends "base.html" %}
+{% block body %}
+Your account is now activated.
+{% endblock %}
diff --git a/sweettooth/auth/urls.py b/sweettooth/auth/urls.py
index 3906475..1a49c53 100644
--- a/sweettooth/auth/urls.py
+++ b/sweettooth/auth/urls.py
@@ -3,7 +3,7 @@ from django.views.generic.base import TemplateView
 from django.conf.urls import patterns, url, include
 from django.contrib.auth.views import login, logout
 from auth import views, forms
-from registration.views import register
+from registration.backends.default.views import RegistrationView
 
 urlpatterns = patterns('',
     url(r'^login/', login,
@@ -15,14 +15,13 @@ urlpatterns = patterns('',
     url(r'^logout/', logout,
         dict(next_page='/'), name='auth-logout'),
 
-    url(r'^register/$', register,
-        dict(form_class=forms.AutoFocusRegistrationForm),
+    url(r'^register/$', RegistrationView.as_view(form_class=forms.AutoFocusRegistrationForm),
         name='registration_register'),
 
     url(r'settings/(?P<user>.+)', TemplateView.as_view(template_name='registration/settings.html'),
         name='auth-settings'),
 
-    url(r'', include('registration.urls')),
+    url(r'', include('registration.backends.default.urls')),
     url(r'^profile/(?P<user>.+)', views.profile, name='auth-profile'),
     url(r'^profile/', views.profile_redirect, name='auth-profile'),
 )


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]