Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #53 from bmispelon/registration-cbv

Fix for using upstream django-registration
  • Loading branch information...
commit c2c8c21a9938e1a32e85dd0ceaee9f205b4fd7e2 2 parents 370a6ff + 73f68fe
@aaugustin aaugustin authored
View
8 accounts/urls.py
@@ -4,18 +4,14 @@
from django.contrib.auth import views as auth_views
from registration.forms import RegistrationFormUniqueEmail
-from registration import views as registration_views
+from registration.backends.default.views import RegistrationView
from . import views as account_views
urlpatterns = patterns('',
url(
r'^register/$',
- registration_views.register,
- {
- 'backend': 'registration.backends.default.DefaultBackend',
- 'form_class': RegistrationFormUniqueEmail,
- },
+ RegistrationView.as_view(form_class=RegistrationFormUniqueEmail),
name='registration_register',
),
url(
View
2  deploy-requirements.txt
@@ -7,7 +7,7 @@ http://bitbucket.org/ubernostrum/django-contact-form/get/tip.bz2
django-haystack == 1.2.7
django-push == 0.4
# 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
+-e hg+https://bitbucket.org/ubernostrum/django-registration@b3c41b3c7f50523b4ecb8267d6d27a918adc2e1f#egg=django-registration
django-secure == 0.1.2
docutils == 0.10
feedparser == 5.1.3
View
6 templates/registration/login.html
@@ -10,7 +10,9 @@
<p class="error">Please correct the errors below:</p>
{% endif %}
-<form method="post" action="?next={{ next|default:"/" }}">{% csrf_token %}
+<form method="post" action="">
+{% csrf_token %}
+<input type="hidden" name="next" value="{{ next|default:"/" }}">
<dl>
<dt><label for="id_username">Username:</label>{% if form.username.errors %} <span class="error">{{ form.username.errors|join:", " }}</span>{% endif %}</dt>
<dd>{{ form.username }}</dd>
@@ -25,4 +27,4 @@
<p>If you don't have an account, you can <a href="/accounts/register/">sign
up</a> for one.</p>
<p>If you forgot your password, you can <a href="/accounts/password/reset/">reset it</a>.</p>
-{% endblock %}
+{% endblock %}
Please sign in to comment.
Something went wrong with that request. Please try again.