app/urls.py
changeset 226 a92b11181a49
parent 205 4a86df751222
child 227 b116326abf74
equal deleted inserted replaced
225:2590d6b83568 226:a92b11181a49
    18   ]
    18   ]
    19 
    19 
    20 
    20 
    21 from django.conf.urls.defaults import *
    21 from django.conf.urls.defaults import *
    22 
    22 
       
    23 from soc.logic import key_name
       
    24 
    23 
    25 
    24 urlpatterns = patterns(
    26 urlpatterns = patterns(
    25     '',
    27     '',
    26     (r'^$', 'soc.views.site.home.public'),
    28     (r'^$', 'soc.views.site.home.public'),
    27     (r'^site/home$', 'soc.views.site.home.public'),
    29     (r'^site/home$', 'soc.views.site.home.public'),
    36     # (r'^user/roles/(?P<linkname>[_0-9a-z]+)$',
    38     # (r'^user/roles/(?P<linkname>[_0-9a-z]+)$',
    37     #  'soc.views.user.roles.dashboard'),
    39     #  'soc.views.user.roles.dashboard'),
    38 
    40 
    39     (r'^site/user/lookup$', 'soc.views.site.user.profile.lookup'),
    41     (r'^site/user/lookup$', 'soc.views.site.user.profile.lookup'),
    40     (r'^site/user/profile$', 'soc.views.site.user.profile.create'),
    42     (r'^site/user/profile$', 'soc.views.site.user.profile.create'),
    41     (r'^site/user/profile/(?P<linkname>[_0-9a-z]+)$',
    43     (r'^site/user/profile/%s$' % key_name.LINKNAME_ARG_PATTERN,
    42      'soc.views.site.user.profile.edit'),
    44      'soc.views.site.user.profile.edit'),
    43     (r'^site/user/list$', 'soc.views.site.user.list.all'),
    45     (r'^site/user/list$', 'soc.views.site.user.list.all'),
       
    46 
       
    47     (r'^docs/show$', 'soc.views.docs.show.public'),
       
    48     (r'^site/docs/edit$', 'soc.views.site.docs.edit.create'),
       
    49     # TODO(tlarsen): need a better path regex pattern than this
       
    50     (r'^site/docs/edit/%s$' % key_name.WORK_PATH_LINKNAME_ARGS_PATTERN,
       
    51      'soc.views.site.docs.edit.edit'),
       
    52     (r'^site/docs/list$', 'soc.views.site.docs.list.all'),
    44     
    53     
    45     # TODO(pawel.solyga): uncomment when the view functions are committed
    54     # TODO(pawel.solyga): uncomment when the view functions are committed
    46     #(r'^site/sponsor/profile$', 'soc.views.site.sponsor.profile.edit'),
    55     #(r'^site/sponsor/profile$', 'soc.views.site.sponsor.profile.edit'),
    47     #(r'^site/sponsor/list$', 'soc.views.site.sponsor.list.all'),
    56     #(r'^site/sponsor/list$', 'soc.views.site.sponsor.list.all'),
    48     
    57     
    49     (r'^user/profile$', 'soc.views.user.profile.edit'),
    58     (r'^user/profile$', 'soc.views.user.profile.edit'),
    50     (r'^user/profile/(?P<linkname>[_0-9a-z]+)$',
    59     (r'^user/profile/%s$' % key_name.LINKNAME_ARG_PATTERN,
    51      'soc.views.user.profile.edit'),
    60      'soc.views.user.profile.edit'),
    52 
    61 
       
    62     # these are not really used...
    53     (r'^org/profile/(?P<program>ghop[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$',
    63     (r'^org/profile/(?P<program>ghop[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$',
    54      'soc.views.person.profile.edit',
    64      'soc.views.person.profile.edit',
    55      {'template': 'ghop/person/profile/edit.html'}),
    65      {'template': 'ghop/person/profile/edit.html'}),
    56     (r'^org/profile/(?P<program>[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$',
    66     (r'^org/profile/(?P<program>[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$',
    57      'soc.views.person.profile.edit'),
    67      'soc.views.person.profile.edit'),