mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-15 19:47:08 +00:00
static files redone
This commit is contained in:
51
urls.py
51
urls.py
@@ -3,8 +3,10 @@ from django.conf.urls import *
|
||||
from django.views.generic.edit import UpdateView
|
||||
from django.views.generic.list import ListView
|
||||
from django.contrib import admin
|
||||
from django.contrib.staticfiles import views as staticviews
|
||||
|
||||
#from django.contrib.staticfiles import views as staticviews
|
||||
#from django.conf.urls.static import static
|
||||
from django.urls import reverse, resolve
|
||||
#
|
||||
from .core.views import * # flat import
|
||||
from .core.views_other import *
|
||||
from .core.views_caves import *
|
||||
@@ -34,7 +36,7 @@ actualurlpatterns = [
|
||||
# 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'^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"),
|
||||
url(r'^logbookentry/(?P<date>.*)/(?P<slug>.*)/?$', views_logbooks.logbookentry,name="logbookentry"),
|
||||
url(r'^newlogbookentry/(?P<expeditionyear>.*)$', views_logbooks.newLogbookEntry, name="newLogBookEntry"),
|
||||
@@ -71,7 +73,8 @@ actualurlpatterns = [
|
||||
url(r'^prospecting_guide/$', views_caves.prospecting),
|
||||
url(r'^logbooksearch/(.*)/?$', views_logbooks.logbookSearch),
|
||||
|
||||
url(r'^statistics/?$', views_statistics.stats, name="stats"),
|
||||
url(r'^statistics/?$', views_statistics.stats, name="stats"),
|
||||
url(r'^stats/?$', views_statistics.stats, name="stats"),
|
||||
url(r'^pathsreport.*$', views_statistics.pathsreport, name="pathsreport"),
|
||||
|
||||
url(r'^controlpanel/?$', views_other.controlPanel, name="controlpanel"),
|
||||
@@ -82,8 +85,8 @@ actualurlpatterns = [
|
||||
|
||||
url(r'^admin/doc/?', include('django.contrib.admindocs.urls')), # needs docutils Python module (http://docutils.sf.net/).
|
||||
url(r'^admin/', admin.site.urls),
|
||||
url(r'^accounts/', include('registration.backends.default.urls')),
|
||||
url(r'^profiles/', include('profiles.urls')), # not used ? Delete this entire app then.
|
||||
url(r'^accounts/', include('registration.backends.default.urls')), # needed to log in!
|
||||
# url(r'^profiles/', include('profiles.urls')), # not used ? Delete this entire app then.
|
||||
|
||||
url(r'^survexblock/(.+)$', views_caves.survexblock, name="survexblock"),
|
||||
url(r'^survexfile/(?P<survex_file>.*?)\.svx$', views_survex.svx, name="svx"),
|
||||
@@ -95,39 +98,33 @@ actualurlpatterns = [
|
||||
url(r'^survexfile/(?P<survex_cave>.*)$', views_survex.survexcavesingle, name="survexcavessingle"),
|
||||
url(r'^survexfileraw/(?P<survex_file>.*?)\.svx$', views_survex.svxraw, name="svxraw"),
|
||||
|
||||
url(r'^survey_files/download/(?P<path>.*)$', view_surveys.download),
|
||||
# url(r'^survey_files/download/(?P<path>.*)$', view_surveys.download), # needs rewriting
|
||||
|
||||
#(r'^survey_scans/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.SURVEY_SCANS, 'show_indexes':True}),
|
||||
url(r'^survey_scans/$', view_surveys.surveyscansfolders, name="surveyscansfolders"),
|
||||
url(r'^survey_scans/(?P<path>[^/]+)/$', view_surveys.surveyscansfolder, name="surveyscansfolder"),
|
||||
# This next line is beyond daft. If anyone uploads a file *anywhere* in SURVEY_SCANS which doesn't match, troggle crashes horribly. Has been failing for pdf and JPG files for years:
|
||||
url(r'^survey_scans/(?P<path>[^/]+)/(?P<file>[^/]+(?:png|jpg|pdf|jpeg|PNG|JPG|PDF|JPEG))$',
|
||||
url(r'^survey_scans/(?P<path>[^/]+)/(?P<file>[^/]+)$',
|
||||
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'^tunneldata/$', view_surveys.tunneldata, name="tunneldata"),
|
||||
url(r'^tunneldataraw/(?P<path>.+?\.xml)$', view_surveys.tunnelfile, name="tunnelfile"),
|
||||
# url(r'^tunneldatainfo/(?P<path>.+?\.xml)$', view_surveys.tunnelfileinfo, name="tunnelfileinfo"),
|
||||
url(r'^tunneldataraw/(?P<path>.+?\.xml)/upload$',view_surveys.tunnelfileupload, name="tunnelfileupload"),
|
||||
|
||||
url(r'^prospecting/(?P<name>[^.]+).png$', prospecting_image, name="prospecting_image"),
|
||||
|
||||
url(r'^expofiles/(?P<path>.*)$', staticviews.serve,
|
||||
{'document_root': settings.EXPOFILES, 'show_indexes': True}),
|
||||
url(r'^static/(?P<path>.*)$', staticviews.serve,
|
||||
{'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'^expofiles/(?P<filepath>.*)$', view_surveys.expofilessingle, name="single"), # EXPOFILES
|
||||
url(r'^static/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # MEDIA_ROOT: CSS and JS
|
||||
url(r'^site_media/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # MEDIA_ROOT: CSS and JS
|
||||
# url(r'^javascript/(?P<filepath>.*)$', view_surveys.cssfilessingle, name="single"), # JSLIB_URL - unused
|
||||
|
||||
# static views not working, removed as a plugin. Use apache instead to serve these:
|
||||
# url(r'^photos/(?P<path>.*)$', staticviews.serve,
|
||||
# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
|
||||
# url(r'^gallery/(?P<path>.*)$', staticviews.serve,
|
||||
# {'document_root': settings.PHOTOS_ROOT, 'show_indexes':True}),
|
||||
|
||||
url(r'^(.*)_edit$', flatviews.editflatpage, name="editflatpage"),
|
||||
url(r'^(.*)$', flatviews.flatpage, name="flatpage"),
|
||||
url(r'^(.*)$', flatviews.flatpage, name="flatpage"),
|
||||
]
|
||||
|
||||
#Allow prefix to all urls
|
||||
|
||||
Reference in New Issue
Block a user