From 5c41a3576caf069e366c3e50ce59182f9c44008c Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Fri, 26 Aug 2016 13:53:40 +1000 Subject: [PATCH] re-structures the URLs a bit, puts the items sold report under reports/items_sold --- registrasion/urls.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/registrasion/urls.py b/registrasion/urls.py index 89c2aac8..f22b67c6 100644 --- a/registrasion/urls.py +++ b/registrasion/urls.py @@ -1,7 +1,8 @@ import views import staff_views -from django.conf.urls import url, patterns +from django.conf.urls import include +from django.conf.urls import url from .views import ( product_category, @@ -15,7 +16,8 @@ from .views import ( guided_registration, ) -urlpatterns = [ + +public = [ url(r"^category/([0-9]+)$", product_category, name="product_category"), url(r"^checkout$", checkout, name="checkout"), url(r"^credit_note/([0-9]+)$", credit_note, name="credit_note"), @@ -31,5 +33,15 @@ urlpatterns = [ url(r"^register$", guided_registration, name="guided_registration"), url(r"^register/([0-9]+)$", guided_registration, name="guided_registration"), - url(r"^report$", staff_views.items_sold, name="items_sold"), # TODO: rm +] + + +reports = [ + url(r"^items_sold/?$", staff_views.items_sold, name="items_sold"), +] + + +urlpatterns = [ + url(r"^reports/", include(reports)), + url(r"^", include(public)) # This one must go last. ]