Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix a localized urls.py bug with our catch-all being above a necessar…

…y DEBUG line.
  • Loading branch information...
commit f143b13bbf13cc91dcb69ef1bf80f32f0c3e294d 1 parent 2868bcb
@relrod relrod authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 w8upd/urls.py
View
9 w8upd/urls.py
@@ -16,12 +16,15 @@
(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
(r'^links/$', 'links.views.all_links'),
(r'^contacts/$', list_detail.object_list, {"queryset" : Contact.objects.all()}),
-
- # And a catchall.
- (r'^(.*)/', 'pages.views.viewpage'),
)
if settings.DEBUG:
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)
+
+# The catchall goes down here -- because media needs to be added before it,
+# if we're in DEBUG.
+urlpatterns += patterns('',
+ (r'^(.*)/', 'pages.views.viewpage'),
+)
Please sign in to comment.
Something went wrong with that request. Please try again.