From a8ccf08cd00881e808daca20d04a19b6594932d6 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 30 Nov 2010 22:03:37 +0100 Subject: [PATCH] items always start with [A-Z0-9] --- pandora/item/urls.py | 14 +++++++------- pandora/urls.py | 2 +- static/404.html | 1 + static/50x.html | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 static/404.html create mode 100644 static/50x.html diff --git a/pandora/item/urls.py b/pandora/item/urls.py index 78dc1b7..fee31d5 100644 --- a/pandora/item/urls.py +++ b/pandora/item/urls.py @@ -5,12 +5,12 @@ from django.conf.urls.defaults import * urlpatterns = patterns("item.views", - (r'^(?P.*)/frame/(?P\d+)/(?P[0-9\.,]+).jpg$', 'frame'), - (r'^(?P.*)/(?P.*.webm)$', 'video'), - (r'^(?P.*)/(?P.*.mp4)$', 'video'), - (r'^(?P.*)/poster\.(?P\d+)\.jpg$', 'poster'), - (r'^(?P.*)/poster\.(?Plarge)\.jpg$', 'poster'), - (r'^(?P.*)/poster\.jpg$', 'poster'), - (r'^(?P.*)/timelines/(?P.+)\.(?P\d+)\.(?P\d+)\.png$', 'timeline'), + (r'^(?P[A-Z0-9].*)/frame/(?P\d+)/(?P[0-9\.,]+).jpg$', 'frame'), + (r'^(?P[A-Z0-9].*)/(?P.*.webm)$', 'video'), + (r'^(?P[A-Z0-9].*)/(?P.*.mp4)$', 'video'), + (r'^(?P[A-Z0-9].*)/poster\.(?P\d+)\.jpg$', 'poster'), + (r'^(?P[A-Z0-9].*)/poster\.(?Plarge)\.jpg$', 'poster'), + (r'^(?P[A-Z0-9].*)/poster\.jpg$', 'poster'), + (r'^(?P[A-Z0-9].*)/timelines/(?P.+)\.(?P\d+)\.(?P\d+)\.png$', 'timeline'), ) diff --git a/pandora/urls.py b/pandora/urls.py index a837da8..c232e64 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -38,6 +38,6 @@ if settings.DEBUG: {'document_root': settings.TESTS_ROOT}), ) urlpatterns += patterns('', - (r'.*', 'app.views.index'), + (r'^[A-Z0-9].*$', 'app.views.index'), ) diff --git a/static/404.html b/static/404.html new file mode 100644 index 0000000..99bc2a2 --- /dev/null +++ b/static/404.html @@ -0,0 +1 @@ +File not found diff --git a/static/50x.html b/static/50x.html new file mode 100644 index 0000000..6b2de3e --- /dev/null +++ b/static/50x.html @@ -0,0 +1 @@ +pan.do/ra is broken.