From 4664c4711a943e06be9d97ed2082ff2f623509f2 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Fri, 2 Sep 2016 11:20:03 +1000 Subject: [PATCH] Moves staff_views to reporting/views --- .../{staff_views.py => reporting/views.py} | 15 +++++++-------- registrasion/urls.py | 10 +++++----- 2 files changed, 12 insertions(+), 13 deletions(-) rename registrasion/{staff_views.py => reporting/views.py} (95%) diff --git a/registrasion/staff_views.py b/registrasion/reporting/views.py similarity index 95% rename from registrasion/staff_views.py rename to registrasion/reporting/views.py index 47174fdb..935a3299 100644 --- a/registrasion/staff_views.py +++ b/registrasion/reporting/views.py @@ -1,6 +1,3 @@ -import forms -import views - from collections import namedtuple from django.contrib.auth.decorators import user_passes_test @@ -13,12 +10,14 @@ from django.http import Http404 from django.shortcuts import render from functools import wraps -from models import commerce -from models import inventory +from registrasion import forms +from registrasion.models import commerce +from registrasion.models import inventory +from registrasion import views -from reporting.reports import get_all_reports -from reporting.reports import Report -from reporting.reports import report_view +from reports import get_all_reports +from reports import Report +from reports import report_view @user_passes_test(views._staff_only) diff --git a/registrasion/urls.py b/registrasion/urls.py index 8f7408da..22df0e51 100644 --- a/registrasion/urls.py +++ b/registrasion/urls.py @@ -1,5 +1,5 @@ import views -import staff_views +from reporting import views as reporting_views from django.conf.urls import include from django.conf.urls import url @@ -37,10 +37,10 @@ public = [ reports = [ - url(r"^$", staff_views.reports_list, name="reports_list"), - url(r"^credit_notes/?$", staff_views.credit_notes, name="credit_notes"), - url(r"^inventory/?$", staff_views.inventory, name="inventory"), - url(r"^items_sold/?$", staff_views.items_sold, name="items_sold"), + url(r"^$", reporting_views.reports_list, name="reports_list"), + url(r"^credit_notes/?$", reporting_views.credit_notes, name="inventory"), + url(r"^inventory/?$", reporting_views.inventory, name="inventory"), + url(r"^items_sold/?$", reporting_views.items_sold, name="items_sold"), ]