Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / urls.py @ 1ecda536

History | View | Annotate | Download (8.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

    
41
from astakos.im import settings
42

    
43
urlpatterns = patterns(
44
    'astakos.im.views',
45
    url(r'^$', 'index', {}, name='index'),
46
    url(r'^login/?$', 'login', {}, name='login'),
47
    url(r'^landing/?$', 'landing', {}, name='landing'),
48
    url(r'^profile/update_token?$', 'update_token', {}, name='update_token'),
49
    url(r'^profile/?$','edit_profile', {}, name='edit_profile'),
50
    url(r'^api_access/?$','api_access', {}, name='api_access'),
51
    url(r'^feedback/?$', 'feedback', {}, name='feedback'),
52
    url(r'^signup/?$', 'signup', {'on_success': 'index', 'extra_context': {'login_form': LoginForm()}}, name='signup'),
53
    url(r'^logout/?$', 'logout', {'template': 'im/login.html', 'extra_context': {'login_form': LoginForm()}}, name='logout'),
54
    url(r'^activate/?$', 'activate', {}, name='activate'),
55
    url(r'^approval_terms/?$', 'approval_terms', {}, name='latest_terms'),
56
    url(r'^approval_terms/(?P<term_id>\d+)/?$', 'approval_terms'),
57
    url(r'^send/activation/(?P<user_id>\d+)/?$', 'send_activation', {}, name='send_activation'),
58
    url(r'^resources/?$', 'resource_usage', {}, name='resource_usage'),
59

    
60
#    url(r'^billing/?$', 'billing', {}, name='billing'),
61
#    url(r'^timeline/?$', 'timeline', {}, name='timeline'),
62

    
63
    url(r'^projects/add/?$', 'project_add', {}, name='project_add'),
64
    url(r'^projects/?$', 'project_list', {}, name='project_list'),
65
    url(r'^projects/search/?$', 'project_search', {}, name='project_search'),
66
    url(r'^projects/(?P<chain_id>\d+)/?$', 'project_detail', {}, name='project_detail'),
67
    url(r'^projects/(?P<chain_id>\d+)/join/?$', 'project_join', {}, name='project_join'),
68
    url(r'^projects/(?P<chain_id>\d+)/leave/?$', 'project_leave', {}, name='project_leave'),
69
    url(r'^projects/(?P<chain_id>\d+)/cancel/?$', 'project_cancel', {}, name='project_cancel'),
70
    url(r'^projects/(?P<chain_id>\d+)/members/?$', 'project_members', {}, name='project_members'),
71
    url(r'^projects/(?P<chain_id>\d+)/members/approved/?$', 'project_members', {'members_status_filter':1}, name='project_approved_members'),
72
    url(r'^projects/(?P<chain_id>\d+)/members/accept/?$',
73
        'project_members_action', {'action':'accept'},
74
        name='project_members_accept'),
75
    url(r'^projects/(?P<chain_id>\d+)/members/remove/?$',
76
        'project_members_action', {'action':'remove'},
77
        name='project_members_remove'),
78
    url(r'^projects/(?P<chain_id>\d+)/members/reject/?$',
79
        'project_members_action', {'action':'reject'},
80
        name='project_members_reject'),
81
    url(r'^projects/(?P<chain_id>\d+)/members/pending/?$', 'project_members', {'members_status_filter':0}, name='project_pending_members'),
82
    url(r'^projects/(?P<chain_id>\d+)/(?P<memb_id>\d+)/accept/?$', 'project_accept_member', {}, name='project_accept_member'),
83
    url(r'^projects/(?P<chain_id>\d+)/(?P<memb_id>\d+)/reject/?$', 'project_reject_member', {}, name='project_reject_member'),
84
    url(r'^projects/(?P<chain_id>\d+)/(?P<memb_id>\d+)/remove/?$', 'project_remove_member', {}, name='project_remove_member'),
85
    url(r'^projects/app/(?P<application_id>\d+)/?$', 'project_app', {}, name='project_app'),
86
    url(r'^projects/app/(?P<application_id>\d+)/modify$', 'project_modify', {}, name='project_modify'),
87
    url(r'^projects/app/(?P<application_id>\d+)/approve$', 'project_app_approve', {}, name='project_app_approve'),
88
    url(r'^projects/app/(?P<application_id>\d+)/deny$', 'project_app_deny', {}, name='project_app_deny'),
89
    url(r'^projects/app/(?P<application_id>\d+)/dismiss$', 'project_app_dismiss', {}, name='project_app_dismiss'),
90
    url(r'^projects/app/(?P<application_id>\d+)/cancel$', 'project_app_cancel', {}, name='project_app_cancel'),
91

    
92
    url(r'^projects/how_it_works/?$', 'how_it_works', {}, name='how_it_works'),
93
    url(r'^remove_auth_provider/(?P<pk>\d+)?$', 'remove_auth_provider', {}, name='remove_auth_provider'),
94
)
95

    
96

    
97
if settings.EMAILCHANGE_ENABLED:
98
    urlpatterns += patterns(
99
        'astakos.im.views',
100
        url(r'^email_change/?$', 'change_email', {}, name='email_change'),
101
        url(r'^email_change/confirm/(?P<activation_key>\w+)/?$', 'change_email', {},
102
            name='email_change_confirm'))
103

    
104
if 'local' in settings.IM_MODULES:
105
    urlpatterns += patterns(
106
        'astakos.im.views.target.local',
107
        url(r'^local/?$', 'login'),
108
        url(r'^password_change/?$', 'password_change', {
109
            'post_change_redirect':'profile',
110
            'password_change_form':ExtendedPasswordChangeForm},
111
            name='password_change'),
112
        url(r'^local/password_reset/done$', 'password_reset_done'),
113
        url(r'^local/reset/confirm/done$',
114
            'password_reset_confirm_done'),
115
        url(r'^local/password_reset/?$', 'password_reset', {
116
            'email_template_name':'registration/password_email.txt',
117
            'password_reset_form':ExtendedPasswordResetForm,
118
            'post_reset_redirect':'password_reset/done'}),
119
        url(r'^local/password_reset_done/?$', 'password_reset_done'),
120
        url(r'^local/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/?$',
121
         'password_reset_confirm', {
122
             'set_password_form':ExtendedSetPasswordForm,
123
             'post_reset_redirect': 'done'}),
124
        url(r'^local/password/reset/complete/?$', 'password_reset_complete')
125
    )
126

    
127
if settings.INVITATIONS_ENABLED:
128
    urlpatterns += patterns(
129
        'astakos.im.views',
130
        url(r'^invite/?$', 'invite', {}, name='invite'))
131

    
132
if 'shibboleth' in settings.IM_MODULES:
133
    urlpatterns += patterns(
134
        'astakos.im.views.target',
135
        url(r'^login/shibboleth/?$', 'shibboleth.login'),
136
    )
137

    
138
if 'twitter' in settings.IM_MODULES:
139
    urlpatterns += patterns(
140
        'astakos.im.views.target',
141
        url(r'^login/twitter/?$', 'twitter.login'),
142
        url(r'^login/twitter/authenticated/?$',
143
            'twitter.authenticated'))
144

    
145
if 'google' in settings.IM_MODULES:
146
    urlpatterns += patterns(
147
        'astakos.im.views.target',
148
        url(r'^login/google/?$', 'google.login'),
149
        url(r'^login/google/authenticated/?$',
150
            'google.authenticated'))
151

    
152
if 'linkedin' in settings.IM_MODULES:
153
    urlpatterns += patterns(
154
        'astakos.im.views.target',
155
        url(r'^login/linkedin/?$', 'linkedin.login'),
156
        url(r'^login/linkedin/authenticated/?$',
157
            'linkedin.authenticated'))
158

    
159
urlpatterns += patterns(
160
    'astakos.im.views',
161
    url(r'^get_menu/?$', 'get_menu'),
162
    url(r'^get_services/?$', 'get_services'))
163

    
164
urlpatterns += patterns(
165
    'astakos.api.user',
166
    url(r'^authenticate/?$', 'authenticate'))