/
urls.py
44 lines (37 loc) · 1.45 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
"""
URLconf for registration and activation, using the paypal_registration backend
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/', include('registration.backends.default.urls')),
"""
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from registration.views import activate
from registration.views import register
urlpatterns = patterns('',
url(r'^activate/complete/$',
direct_to_template,
{'template': 'registration/activation_complete.html'},
name='registration_activation_complete'),
url(r'^activate/(?P<activation_key>\w+)/$',
activate,
{'backend': 'paypal_registration.PaypalBackend'},
name='registration_activate'),
url(r'^register/$',
register,
{'backend': 'paypal_registration.PaypalBackend'},
name='registration_register'),
url(r'^register/complete/$',
direct_to_template,
{'template': 'registration/registration_complete.html'},
name='registration_complete'),
url(r'^register/closed/$',
direct_to_template,
{'template': 'registration/registration_closed.html'},
name='registration_disallowed'),
url(r'^pay_with_paypal/(P<username>\w+)/$',
'paypal_registration.views.pay_with_paypal',
name='pay_with_paypal'),
(r'', include('registration.auth_urls')),
)