Update some of the URL patterns to get their link_name parsing from the new
patterns in key_name.py. (Using it like this in urls.py is why key_name.py
needs to not depend on other modules...)
--- a/app/urls.py Wed Oct 01 00:48:46 2008 +0000
+++ b/app/urls.py Wed Oct 01 00:51:49 2008 +0000
@@ -20,6 +20,8 @@
from django.conf.urls.defaults import *
+from soc.logic import key_name
+
urlpatterns = patterns(
'',
@@ -38,18 +40,26 @@
(r'^site/user/lookup$', 'soc.views.site.user.profile.lookup'),
(r'^site/user/profile$', 'soc.views.site.user.profile.create'),
- (r'^site/user/profile/(?P<linkname>[_0-9a-z]+)$',
+ (r'^site/user/profile/%s$' % key_name.LINKNAME_ARG_PATTERN,
'soc.views.site.user.profile.edit'),
(r'^site/user/list$', 'soc.views.site.user.list.all'),
+
+ (r'^docs/show$', 'soc.views.docs.show.public'),
+ (r'^site/docs/edit$', 'soc.views.site.docs.edit.create'),
+ # TODO(tlarsen): need a better path regex pattern than this
+ (r'^site/docs/edit/%s$' % key_name.WORK_PATH_LINKNAME_ARGS_PATTERN,
+ 'soc.views.site.docs.edit.edit'),
+ (r'^site/docs/list$', 'soc.views.site.docs.list.all'),
# TODO(pawel.solyga): uncomment when the view functions are committed
#(r'^site/sponsor/profile$', 'soc.views.site.sponsor.profile.edit'),
#(r'^site/sponsor/list$', 'soc.views.site.sponsor.list.all'),
(r'^user/profile$', 'soc.views.user.profile.edit'),
- (r'^user/profile/(?P<linkname>[_0-9a-z]+)$',
+ (r'^user/profile/%s$' % key_name.LINKNAME_ARG_PATTERN,
'soc.views.user.profile.edit'),
+ # these are not really used...
(r'^org/profile/(?P<program>ghop[_0-9a-z]+)/(?P<linkname>[_0-9a-z]+)/$',
'soc.views.person.profile.edit',
{'template': 'ghop/person/profile/edit.html'}),