mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-03-25 03:31:50 +00:00
Also, the urls for the person model now allow lookups using their actual first and last name in the url instead of the primary key. We should do similar things for all models, maybe even using the url as a search which results in a page with multiple model instance results if the input is ambiguous (e.g. they only enter a first name). Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8093 by aaron @ 12/13/2008 11:17 PM
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
from django.conf.urls.defaults import *
|
|
from expo.views import *
|
|
import troggle.settings as settings
|
|
from django.contrib import admin
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns('',
|
|
# Example:
|
|
(r'^cave/?$', caveindex),
|
|
(r'^cave/(?P<cave_id>[^/]+)/?$', cave),
|
|
(r'^cave/(?P<cave_id>[^/]+)/?(?P<ent_letter>[^/])$', ent),
|
|
#(r'^cave/(?P<cave_id>[^/]+)/edit/$', edit_cave),
|
|
(r'^cavesearch', caveSearch),
|
|
|
|
(r'^survex/(?P<survex_file>.*)\.index$', index),
|
|
(r'^survex/(?P<survex_file>.*)\.svx$', svx),
|
|
(r'^survex/(?P<survex_file>.*)\.3d$', threed),
|
|
(r'^survex/(?P<survex_file>.*)\.log$', log),
|
|
(r'^survex/(?P<survex_file>.*)\.err$', err),
|
|
|
|
(r'^person/?$', personindex),
|
|
(r'^person/(?P<person_id>\d*)(?P<first_name>[a-zA-Z]*)[-_/\.\s(\%20)]*(?P<last_name>[a-zA-Z]*)/?$', person),
|
|
|
|
(r'^logbookentry/(.*)/?$', logbookentry),
|
|
(r'^logbooksearch/(.*)/?$', logbookSearch),
|
|
|
|
(r'^statistics/?$', stats),
|
|
|
|
(r'^admin/doc/?', include('django.contrib.admindocs.urls')),
|
|
(r'^admin/(.*)', admin.site.root),
|
|
|
|
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
|
|
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
|
|
|
|
)
|