root / snf-astakos-app / astakos / im / urls.py @ 003d8fcf
History | View | Annotate | Download (7.1 kB)
1 |
# Copyright 2011-2012 GRNET S.A. All rights reserved.
|
---|---|
2 |
#
|
3 |
# Redistribution and use in source and binary forms, with or
|
4 |
# without modification, are permitted provided that the following
|
5 |
# conditions are met:
|
6 |
#
|
7 |
# 1. Redistributions of source code must retain the above
|
8 |
# copyright notice, this list of conditions and the following
|
9 |
# disclaimer.
|
10 |
#
|
11 |
# 2. Redistributions in binary form must reproduce the above
|
12 |
# copyright notice, this list of conditions and the following
|
13 |
# disclaimer in the documentation and/or other materials
|
14 |
# provided with the distribution.
|
15 |
#
|
16 |
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
17 |
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18 |
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
19 |
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
20 |
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
21 |
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
22 |
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
23 |
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
24 |
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
25 |
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
26 |
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
27 |
# POSSIBILITY OF SUCH DAMAGE.
|
28 |
#
|
29 |
# The views and conclusions contained in the software and
|
30 |
# documentation are those of the authors and should not be
|
31 |
# interpreted as representing official policies, either expressed
|
32 |
# or implied, of GRNET S.A.
|
33 |
|
34 |
from django.conf.urls.defaults import patterns, url |
35 |
|
36 |
from astakos.im.forms import ( |
37 |
ExtendedPasswordResetForm, |
38 |
ExtendedPasswordChangeForm, |
39 |
ExtendedSetPasswordForm, LoginForm) |
40 |
from astakos.im.settings import IM_MODULES, INVITATIONS_ENABLED, EMAILCHANGE_ENABLED |
41 |
|
42 |
urlpatterns = patterns( |
43 |
'astakos.im.views',
|
44 |
url(r'^$', 'index', {}, name='index'), |
45 |
url(r'^login/?$', 'index', {}, name='login'), |
46 |
url(r'^landing/?$', 'landing', {}, name='landing'), |
47 |
url(r'^profile/update_token?$', 'update_token', {}, name='update_token'), |
48 |
url(r'^profile/?$','edit_profile', {}, name='edit_profile'), |
49 |
url(r'^feedback/?$', 'feedback', {}, name='feedback'), |
50 |
url(r'^signup/?$', 'signup', {'on_success': 'index', 'extra_context': {'login_form': LoginForm()}}, name='signup'), |
51 |
url(r'^logout/?$', 'logout', {'template': 'im/login.html', 'extra_context': {'login_form': LoginForm()}}, name='logout'), |
52 |
url(r'^activate/?$', 'activate', {}, name='activate'), |
53 |
url(r'^approval_terms/?$', 'approval_terms', {}, name='latest_terms'), |
54 |
url(r'^approval_terms/(?P<term_id>\d+)/?$', 'approval_terms'), |
55 |
url(r'^send/activation/(?P<user_id>\d+)/?$', 'send_activation', {}, name='send_activation'), |
56 |
url(r'^resources/?$', 'resource_usage', {}, name='resource_usage'), |
57 |
|
58 |
# url(r'^billing/?$', 'billing', {}, name='billing'),
|
59 |
# url(r'^timeline/?$', 'timeline', {}, name='timeline'),
|
60 |
|
61 |
url(r'^projects/add/?$', 'project_add', {}, name='project_add'), |
62 |
url(r'^projects/update/(?P<application_id>\d+)/?$', 'project_update', {}, name='project_update'), |
63 |
url(r'^projects/?$', 'project_list', {}, name='project_list'), |
64 |
url(r'^projects/search/?$', 'project_search', {}, name='project_search'), |
65 |
url(r'^projects/(?P<application_id>\d+)/?$', 'project_detail', {}, name='project_detail'), |
66 |
url(r'^projects/(?P<application_id>\d+)/join/?$', 'project_join', {}, name='project_join'), |
67 |
url(r'^projects/(?P<application_id>\d+)/leave/?$', 'project_leave', {}, name='project_leave'), |
68 |
url(r'^projects/(?P<application_id>\d+)/(?P<user_id>\d+)/accept/?$', 'project_accept_member', {}, name='project_accept_member'), |
69 |
url(r'^projects/(?P<application_id>\d+)/(?P<user_id>\d+)/reject/?$', 'project_reject_member', {}, name='project_reject_member'), |
70 |
url(r'^projects/(?P<application_id>\d+)/(?P<user_id>\d+)/remove/?$', 'project_remove_member', {}, name='project_remove_member'), |
71 |
|
72 |
url(r'^projects/how_it_works/?$', 'how_it_works', {}, name='how_it_works'), |
73 |
url(r'^remove_auth_provider/(?P<pk>\d+)?$', 'remove_auth_provider', {}, name='remove_auth_provider'), |
74 |
) |
75 |
|
76 |
|
77 |
if EMAILCHANGE_ENABLED:
|
78 |
urlpatterns += patterns( |
79 |
'astakos.im.views',
|
80 |
url(r'^email_change/?$', 'change_email', {}, name='email_change'), |
81 |
url(r'^email_change/confirm/(?P<activation_key>\w+)/?$', 'change_email', {}, |
82 |
name='email_change_confirm'))
|
83 |
|
84 |
urlpatterns += patterns( |
85 |
'astakos.im.target',
|
86 |
url(r'^login/redirect/?$', 'redirect.login')) |
87 |
|
88 |
if 'local' in IM_MODULES: |
89 |
urlpatterns += patterns( |
90 |
'astakos.im.target',
|
91 |
url(r'^local/?$', 'local.login'), |
92 |
url(r'^password_change/?$', 'local.password_change', { |
93 |
'post_change_redirect':'profile', |
94 |
'password_change_form':ExtendedPasswordChangeForm},
|
95 |
name='password_change'),
|
96 |
url(r'^local/password_reset/done$', 'local.password_reset_done'), |
97 |
url(r'^local/reset/confirm/done$',
|
98 |
'local.password_reset_confirm_done')
|
99 |
) |
100 |
urlpatterns += patterns('django.contrib.auth.views',
|
101 |
url(r'^local/password_reset/?$', 'password_reset', { |
102 |
'email_template_name':'registration/password_email.txt', |
103 |
'password_reset_form':ExtendedPasswordResetForm,
|
104 |
'post_reset_redirect':'password_reset/done'}), |
105 |
url(r'^local/password_reset_done/?$', 'password_reset_done'), |
106 |
url(r'^local/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/?$',
|
107 |
'password_reset_confirm', {
|
108 |
'set_password_form':ExtendedSetPasswordForm,
|
109 |
'post_reset_redirect': 'done'}), |
110 |
url(r'^local/password/reset/complete/?$', 'password_reset_complete') |
111 |
) |
112 |
|
113 |
if INVITATIONS_ENABLED:
|
114 |
urlpatterns += patterns( |
115 |
'astakos.im.views',
|
116 |
url(r'^invite/?$', 'invite', {}, name='invite')) |
117 |
|
118 |
if 'shibboleth' in IM_MODULES: |
119 |
urlpatterns += patterns( |
120 |
'astakos.im.target',
|
121 |
url(r'^login/shibboleth/?$', 'shibboleth.login'), |
122 |
) |
123 |
|
124 |
if 'twitter' in IM_MODULES: |
125 |
urlpatterns += patterns( |
126 |
'astakos.im.target',
|
127 |
url(r'^login/twitter/?$', 'twitter.login'), |
128 |
url(r'^login/twitter/authenticated/?$',
|
129 |
'twitter.authenticated'))
|
130 |
|
131 |
if 'google' in IM_MODULES: |
132 |
urlpatterns += patterns( |
133 |
'astakos.im.target',
|
134 |
url(r'^login/goggle/?$', 'google.login'), |
135 |
url(r'^login/google/authenticated/?$',
|
136 |
'google.authenticated'))
|
137 |
|
138 |
if 'linkedin' in IM_MODULES: |
139 |
urlpatterns += patterns( |
140 |
'astakos.im.target',
|
141 |
url(r'^login/linkedin/?$', 'linkedin.login'), |
142 |
url(r'^login/linkedin/authenticated/?$',
|
143 |
'linkedin.authenticated'))
|
144 |
|
145 |
urlpatterns += patterns( |
146 |
'astakos.im.api',
|
147 |
url(r'^get_services/?$', 'get_services'), |
148 |
url(r'^get_menu/?$', 'get_menu')) |
149 |
|
150 |
urlpatterns += patterns( |
151 |
'astakos.im.api',
|
152 |
url(r'^get_services/?$', 'get_services'), |
153 |
url(r'^get_menu/?$', 'get_menu')) |
154 |
|
155 |
urlpatterns += patterns( |
156 |
'astakos.im.api.user',
|
157 |
url(r'^authenticate/?$', 'authenticate')) |
158 |
|
159 |
urlpatterns += patterns( |
160 |
'astakos.im.api.service',
|
161 |
url(r'^service/api/v2.0/feedback/?$', 'send_feedback'), |
162 |
url(r'^service/api/v2.0/users/?$', 'get_user_info')) |