source: mauRepo/dj_security/trunk/dj_security/urls.py @ 8852

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/dj_security/trunk/dj_security/urls.py
Revision 8852, 2.0 KB checked in by mnagni, 6 years ago (diff)

Incomplete - # 23026: [CEDA Site Python Port]: Navigation after password reset request submitted
 http://team.ceda.ac.uk/trac/ceda/ticket/23026.
Now, instead to leave the user into the security application, after the password reset email is sent, the application redirect the user to the ceda site home page.

  • Property svn:mime-type set to text/plain
Line 
1from django.conf.urls import patterns, include, url
2from django.contrib import admin
3
4from django.conf import settings
5from dj_security.views.dj_security_login import signin, CEDAAuthenticationForm,\
6    signin_success, signin_failure
7from django_authopenid import views as oid_views
8from dj_security.views.reset_password import reset_passwd
9from django.views.generic.base import RedirectView
10
11admin.autodiscover()
12
13# Uncomment the next two lines to enable the admin:
14# from django.contrib import admin
15# admin.autodiscover()
16
17urlpatterns = patterns('',
18    # Examples:
19    # url(r'^$', 'mydjango_secapp.views.home', name='home'),
20    # url(r'^mydjango_secapp/', include('mydjango_secapp.foo.urls')),
21
22    # Uncomment the admin/doc line below to enable admin documentation:
23    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
24
25    # Uncomment the next line to enable the admin:
26    # url(r'^admin/', include(admin.site.urls)),
27    #url(r'^accounts/', include('registration.backends.default.urls')),
28)
29
30urlpatterns += patterns('dj_security.views.dj_security_login',
31   (r'^account/register/$', 'logged_in'),   
32   ("^admin/", include(admin.site.urls)),
33
34    url(r'^reset_passwd/$', reset_passwd, name='user_reset_passwd',
35        kwargs={'template_name': 'reset_password.html'}),
36                       
37    url(r'^account/signin/$', signin, name='user_signin',
38        kwargs={'auth_form':CEDAAuthenticationForm,
39                'template_name': 'signin.html', 'redirect_field_name': 'r',
40                'on_failure': signin_failure}),
41                       
42    url(r'^account/signin/complete/$', oid_views.complete_signin, name='user_complete_signin',
43        kwargs={'on_success': signin_success, 'redirect_field_name': 'r'}),
44                                               
45    #(r'^accounts/profile/$', 'logged_in'),
46    #(r'^locally_logged_in/$', 'locally_logged_in'),
47    url(r'^account/', include('django_authopenid.urls')),   
48   
49    url(r'^$', RedirectView.as_view(url='http://ceda.ac.uk/', permanent=False), name='home_index')
50)
51
Note: See TracBrowser for help on using the repository browser.