diff options
author | Philip Sargent <philip.sargent@gmail.com> | 2023-02-02 11:13:02 +0000 |
---|---|---|
committer | Philip Sargent <philip.sargent@gmail.com> | 2023-02-02 11:13:02 +0000 |
commit | 3b9695b4f324ed5a2fc5d7a815cb2a2fa1878cb1 (patch) | |
tree | 9cf3d22ddaee8ced4783235a232c7cde3f7c7bf5 /urls.py | |
parent | b55bfb886893d7a9b2c08109b08affa732a9bf33 (diff) | |
download | troggle-3b9695b4f324ed5a2fc5d7a815cb2a2fa1878cb1.tar.gz troggle-3b9695b4f324ed5a2fc5d7a815cb2a2fa1878cb1.tar.bz2 troggle-3b9695b4f324ed5a2fc5d7a815cb2a2fa1878cb1.zip |
spiders are asking for weird urls
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -11,7 +11,7 @@ from troggle.core.views.drawings import dwgallfiles, dwgfilesingle from troggle.core.views.editor_helpers import image_selector, new_image_form from troggle.core.views.expo import (editexpopage, expofiles_redirect, expofilessingle, expopage, map, mapfile, - mediapage) + mediapage, spider) from troggle.core.views.logbooks import (Expeditions_jsonListView, Expeditions_tsvListView, expedition, get_logbook_entries, get_people, @@ -78,7 +78,9 @@ else: trogglepatterns = [ path('expofiles/', include(expofilesurls)), # intercepted by Apache, if it is running. path('expofiles', include(expofilesurls)), # curious interaction with the include() here, not just a slash problem. - + + re_path(r'^(.*)_edit_edit$', spider, name="spider"), # web spider funny + re_path(r'^caves$', caveindex, name="caveindex"), re_path(r'^indxal.htm$', caveindex, name="caveindex"), # ~420 hrefs to this url in expoweb files re_path(r'^people/?$', notablepersons, name="notablepersons"), @@ -133,7 +135,7 @@ trogglepatterns = [ re_path(r'^(?P<path>.*)/(?P<slug>[^/]+)_cave_edit/$', edit_cave, name="edit_cave"), # edit_cave needed by cave.html template for url matching re_path(r'^(?P<path>.*)/(?P<caveslug>[^/]+):(?P<slug>[^:]+)_entrance_edit', edit_entrance, name = "editentrance"), #edit existing entrance re_path(r'^(?P<path>.*)/(?P<caveslug>[^/]+)_entrance_new$', edit_entrance, name = "newentrance"), # new entrance for a cave - + re_path(r'^(.*)_edit$', editexpopage, name="editexpopage"), re_path(r'^(?P<karea>\d\d\d\d)(?P<subpath>.*)$', cavepage, name="cavepage"), # shorthand /1623/264 or 1623/161/top.htm # Note that urls eg '/1623/161/l/rl89a.htm' are handled by cavepage which redirects them to 'expopage' # Note that _edit$ for a cave description page in a subfolder e.g. /1623/204/204.html_edit gets caught here and breaks with 404 @@ -207,7 +209,6 @@ trogglepatterns = [ # Helpers to edit HTML re_path(r'^image_selector/(?P<path>.*)', image_selector, name = 'image_selector'), re_path(r'^new_image_form/(?P<path>.*)', new_image_form, name = 'new_image_form'), - # Final catchall which also serves expoweb handbook pages and imagestiny re_path(r'^(.*)$', expopage, name="expopage"), # CATCHALL assumed relative to EXPOWEB |