diff options
author | Avadoot Nachankar <avadoot298@gmail.com> | 2015-01-09 17:42:56 +0530 |
---|---|---|
committer | Avadoot Nachankar <avadoot298@gmail.com> | 2015-01-09 17:42:56 +0530 |
commit | ee0d4be041ce4efb616be8a0ac91c32b3a686b46 (patch) | |
tree | 6cf561ad5135ff11f3f84978a66c4f99b4bcf2ed /gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py | |
parent | 4084b08f5cd1b38a63a6a971c6937290ba3097d1 (diff) | |
download | gnowsys-ee0d4be041ce4efb616be8a0ac91c32b3a686b46.tar.gz |
Fix: Enable visibility of templates for successful completion of registration and activation of account respectively
Diffstat (limited to 'gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py')
-rw-r--r-- | gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py b/gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py index 4af9cd2..00779ba 100644 --- a/gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py +++ b/gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py @@ -1,3 +1,4 @@ +from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls import * @@ -6,13 +7,15 @@ from django.views.generic import RedirectView from django.views.generic import TemplateView from registration.backends.default.views import RegistrationView +from registration.backends.default.views import ActivationView +from registration_email.forms import EmailRegistrationForm +from jsonrpc import jsonrpc_site from gnowsys_ndf.ndf.views.email_registration import password_reset_email, password_reset_error from gnowsys_ndf.ndf.forms import * from gnowsys_ndf.ndf.views.home import HomeRedirectView, homepage from gnowsys_ndf.ndf.views.methods import tag_info from gnowsys_ndf.ndf.views.custom_app_view import custom_app_view, custom_app_new_view -from jsonrpc import jsonrpc_site from gnowsys_ndf.ndf.views import rpc_resources admin.autodiscover() @@ -123,8 +126,25 @@ urlpatterns = patterns('', }, name='password_reset' ), - (r'^accounts/', include('registration_email.backends.default.urls')), - url(r'^accounts/register/$', RegistrationView.as_view(form_class=UserRegistrationForm)), + + url(r'^accounts/activate/(?P<activation_key>\w+)/$', + ActivationView.as_view( + template_name='registration/activation_complete.html', + get_success_url=getattr( + settings, 'REGISTRATION_EMAIL_ACTIVATE_SUCCESS_URL', + lambda request, user: '/accounts/activate/complete/'), + ), + name='registration_activate'), + url(r'^accounts/register/$', + RegistrationView.as_view( + form_class=EmailRegistrationForm, + get_success_url=getattr( + settings, 'REGISTRATION_EMAIL_REGISTER_SUCCESS_URL', + lambda request, user: '/accounts/register/complete/'), + ), + name='registration_register'), + + url(r'^accounts/', include('registration_email.backends.default.urls')), # --end of django-registration url(r'^Beta/', TemplateView.as_view(template_name= 'gstudio/beta.html'), name="beta"), |