summaryrefslogtreecommitdiffstats
path: root/urls.py
diff options
context:
space:
mode:
Diffstat (limited to 'urls.py')
-rw-r--r--urls.py33
1 files changed, 12 insertions, 21 deletions
diff --git a/urls.py b/urls.py
index 3acb9d5..6492538 100644
--- a/urls.py
+++ b/urls.py
@@ -15,26 +15,24 @@ from flatpages import views as flatviews
admin.autodiscover()
-# type url probably means it's used.
-
# HOW DOES THIS WORK:
+# This is a "url dispatcher" - something needed by every web framework.
# url( <regular expression that matches the thing in the web browser>,
-# <reference to python function in 'core' folder>,
-# <name optional argument for URL reversing (doesn't do much)>)
+# <reference to python function in 'core' folder>, <optional name>)
actualurlpatterns = [
-
url(r'^troggle$', views_other.frontpage, name="frontpage"),
url(r'^caves$', views_caves.caveindex, name="caveindex"),
- url(r'^indxal.htm$', views_caves.caveindex, name="caveindex"),
+ url(r'^indxal.htm$', views_caves.caveindex, name="caveindex"),
url(r'^people/?$', views_logbooks.personindex, name="personindex"),
url(r'^newqmnumber/?$', views_other.ajax_QM_number, ),
url(r'^lbo_suggestions/?$', logbook_entry_suggestions), #broken
- #(r'^person/(?P<person_id>\d*)/?$', views_logbooks.person),
+# url(r'^person/(?P<person_id>\d*)/?$', views_logbooks.person),
url(r'^person/(?P<first_name>[A-Z]*[a-z\-\'&;]*)[^a-zA-Z]*(?P<last_name>[a-z\-\']*[^a-zA-Z]*[A-Z]*[a-z\-&;]*)/?', views_logbooks.person, name="person"),
- #url(r'^person/(\w+_\w+)$', views_logbooks.person, name="person"),
-
+# url(r'^person/(\w+_\w+)$', views_logbooks.person, name="person"),
+# url(r'^personform/(.*)$', personForm),
+
url(r'^expedition/(\d+)$', views_logbooks.expedition, name="expedition"),
url(r'^expeditions/?$', views_logbooks.ExpeditionListView.as_view(), name="expeditions"),
url(r'^personexpedition/(?P<first_name>[A-Z]*[a-z&;]*)[^a-zA-Z]*(?P<last_name>[A-Z]*[a-zA-Z&;]*)/(?P<year>\d+)/?$', views_logbooks.personexpedition, name="personexpedition"),
@@ -45,7 +43,7 @@ actualurlpatterns = [
url(r'^newfile', views_other.newFile, name="newFile"), # oddly broken, needs investigating more
url(r'^getEntrances/(?P<caveslug>.*)', views_caves.get_entrances, name = "get_entrances"), #works
- # e.g. /getEntrances/1623-161
+ # e.g. /getEntrances/1623-161
url(r'^getQMs/(?P<caveslug>.*)', views_caves.get_qms, name = "get_qms"), # no template "get_qms"?
url(r'^getPeople/(?P<expeditionslug>.*)', views_logbooks.get_people, name = "get_people"), # fails
url(r'^getLogBookEntries/(?P<expeditionslug>.*)', views_logbooks.get_logbook_entries, name = "get_logbook_entries"), #works
@@ -71,7 +69,6 @@ actualurlpatterns = [
#url(r'^cavesearch', caveSearch),
url(r'^prospecting_guide/$', views_caves.prospecting),
-
url(r'^logbooksearch/(.*)/?$', views_logbooks.logbookSearch),
url(r'^statistics/?$', views_statistics.stats, name="stats"),
@@ -88,9 +85,6 @@ actualurlpatterns = [
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^profiles/', include('profiles.urls')), # not used ? Delete this entire app then.
-# (r'^personform/(.*)$', personForm),
-
-
url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"),
url(r'^survexfile/(?P<survex_file>.*?)\.svx$', views_survex.svx, name="svx"),
url(r'^survexfile/(?P<survex_file>.*?)\.3d$', views_survex.threed, name="threed"),
@@ -111,11 +105,10 @@ actualurlpatterns = [
view_surveys.surveyscansingle, name="surveyscansingle"),
url(r'^tunneldata/$', view_surveys.tunneldata, name="tunneldata"),
+# url(r'^tunneldatainfo/(?P<path>.+?\.xml)$', view_surveys.tunnelfileinfo, name="tunnelfileinfo"),
url(r'^tunneldataraw/(?P<path>.+?\.xml)$', view_surveys.tunnelfile, name="tunnelfile"),
url(r'^tunneldataraw/(?P<path>.+?\.xml)/upload$',view_surveys.tunnelfileupload, name="tunnelfileupload"),
-# url(r'^tunneldatainfo/(?P<path>.+?\.xml)$', view_surveys.tunnelfileinfo, name="tunnelfileinfo"),
-
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
url(r'^expofiles/(?P<path>.*)$', staticviews.serve,
@@ -124,19 +117,17 @@ actualurlpatterns = [
{'document_root': settings.STATIC_ROOT, 'show_indexes': True}),
url(r'^site_media/(?P<path>.*)$', staticviews.serve,
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
+# url(r'^troggle/media-admin/(?P<path>.*)$', staticviews.serve,
+# {'document_root': settings.MEDIA_ADMIN_DIR, 'show_indexes':True}),
#url(r'^tinymce_media/(?P<path>.*)$', staticviews.serve,
# {'document_root': settings.TINY_MCE_MEDIA_ROOT, 'show_indexes': True}),
#url(r'^photos/(?P<path>.*)$', staticviews.serve,
# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
-# url(r'^gallery/(?P<path>.*)$', staticviews.serve,
+# url(r'^gallery/(?P<path>.*)$', staticviews.serve,
# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
-# don't know why this needs troggle/ in here. nice to get it out
- url(r'^troggle/media-admin/(?P<path>.*)$', staticviews.serve,
- {'document_root': settings.MEDIA_ADMIN_DIR, 'show_indexes':True}),
url(r'^(.*)_edit$', flatviews.editflatpage, name="editflatpage"),
url(r'^(.*)$', flatviews.flatpage, name="flatpage"),
-
]
#Allow prefix to all urls