[svn] Decoupled get_absolute_url methods from urlconf by using reverse()

Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8313 by aaron @ 3/30/2009 6:12 AM
This commit is contained in:
substantialnoninfringinguser 2009-05-13 06:12:54 +01:00
parent 7ff0753b13
commit dab8dcea70

View File

@ -26,7 +26,8 @@ urlpatterns = patterns('',
url(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"), url(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"),
url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"), url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"),
url(r'^cavehref/(.+)$', views_caves.cavehref, name="cave"), url(r'^cave/(?P<cave_id>[^/]+)/?$', views_caves.cave, name="cave"),
#url(r'^cavehref/(.+)$', views_caves.cave, name="cave"),
url(r'^jgtfile/(.*)$', view_surveys.jgtfile, name="jgtfile"), url(r'^jgtfile/(.*)$', view_surveys.jgtfile, name="jgtfile"),
url(r'^jgtuploadfile$', view_surveys.jgtuploadfile, name="jgtuploadfile"), url(r'^jgtuploadfile$', view_surveys.jgtuploadfile, name="jgtuploadfile"),
@ -41,7 +42,7 @@ urlpatterns = patterns('',
url(r'^cavearea', caveArea, name="caveArea"), url(r'^cavearea', caveArea, name="caveArea"),
url(r'^survex/(.*?)\.index$', views_survex.index, name="survexindex"), url(r'^survex/(.*?)\.index$', views_survex.index, name="survexindex"),
url(r'^cave/(?P<cave_id>[^/]+)/?$', views_caves.cavehref),
url(r'^cave/(?P<cave_id>[^/]+)/(?P<year>\d\d\d\d)-(?P<qm_id>\d\d)(?P<grade>[ABCDX]?)?$', views_caves.qm, name="qm"), url(r'^cave/(?P<cave_id>[^/]+)/(?P<year>\d\d\d\d)-(?P<qm_id>\d\d)(?P<grade>[ABCDX]?)?$', views_caves.qm, name="qm"),
(r'^survex/(?P<survex_file>.*)\.svx$', svx), (r'^survex/(?P<survex_file>.*)\.svx$', svx),
(r'^survex/(?P<survex_file>.*)\.3d$', threed), (r'^survex/(?P<survex_file>.*)\.3d$', threed),
@ -80,4 +81,6 @@ urlpatterns = patterns('',
(r'^photos/(?P<path>.*)$', 'django.views.static.serve', (r'^photos/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}), {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
url(r'^trip_report/?$',views_other.tripreport,name="trip_report")
) )