Name presale index + unit test for URL names (#784)

* Name the default URL

If metrics collection is enabled, the index page of the site will fail
to load: without a name, the metrics middleware throws a TypeError.

* Test for names on all URLs

This test passes if all URLs have names. Without names, URLs will cause
the optional metrics middleware to throw a TypeError.
This commit is contained in:
Tim Freund
2018-02-26 04:17:42 -05:00
committed by Raphael Michel
parent f763a8694b
commit 1c01e23867
2 changed files with 42 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ presale_patterns_main = [
url(r'', include((locale_patterns + [
url(r'^(?P<organizer>[^/]+)/', include(organizer_patterns)),
url(r'^(?P<organizer>[^/]+)/(?P<event>[^/]+)/', include(event_patterns)),
url(r'^$', TemplateView.as_view(template_name='pretixpresale/index.html'))
url(r'^$', TemplateView.as_view(template_name='pretixpresale/index.html'), name="index")
], 'presale')))
]