from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings

import pretixcontrol.urls
import pretixpresale.urls


urlpatterns = patterns('',
    url(r'^control/', include(pretixcontrol.urls, namespace='control')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'', include(pretixpresale.urls, namespace='presale')),
)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )

@@ -321,25 +321,14 @@
     
-url(r'', include(
+# The 
 pret
@@ -336,22 +336,16 @@
 xpresale
-.urls,
  namespa
@@ -350,21 +350,148 @@
 pace
-='presale')),
+ is configured at the bottom of this file, because it%0A    # contains a wildcard-style URL which has to be configured _after_ debug settings.
 %0A)%0A%0A
@@ -628,10 +628,104 @@
 )),%0A
-
     )%0A
+%0Aurlpatterns += patterns('',%0A    url(r'', include(pretixpresale.urls, namespace='presale'))%0A)%0A

Move URLconfig around to fix Django Debug Toolbar