From c2400c4695aed708f1e6f2dd81df97bdff0bf508 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Fri, 22 Jan 2016 16:21:23 +1100 Subject: [PATCH] Moves the controller modules into their own subpackage. There's going to be a lot of stuff in there. --- registrasion/controllers/__init__.py | 0 registrasion/{ => controllers}/cart.py | 4 ++-- registrasion/{ => controllers}/conditions.py | 0 registrasion/{ => controllers}/invoice.py | 0 registrasion/{controllers.py => controllers/product.py} | 0 registrasion/tests/test_cart.py | 2 +- registrasion/tests/test_ceilings.py | 2 +- registrasion/tests/test_discount.py | 2 +- registrasion/tests/test_enabling_condition.py | 2 +- registrasion/tests/test_invoice.py | 4 ++-- registrasion/tests/test_voucher.py | 2 +- 11 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 registrasion/controllers/__init__.py rename registrasion/{ => controllers}/cart.py (99%) rename registrasion/{ => controllers}/conditions.py (100%) rename registrasion/{ => controllers}/invoice.py (100%) rename registrasion/{controllers.py => controllers/product.py} (100%) diff --git a/registrasion/controllers/__init__.py b/registrasion/controllers/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/registrasion/cart.py b/registrasion/controllers/cart.py similarity index 99% rename from registrasion/cart.py rename to registrasion/controllers/cart.py index 521980f6..8995b864 100644 --- a/registrasion/cart.py +++ b/registrasion/controllers/cart.py @@ -9,7 +9,7 @@ from django.utils import timezone from registrasion import models as rego from conditions import ConditionController -from controllers import ProductController +from product import ProductController class CartController(object): @@ -206,5 +206,5 @@ class CartController(object): quantity = ours - allowed else: quantity = 0 - + discount_item.save() diff --git a/registrasion/conditions.py b/registrasion/controllers/conditions.py similarity index 100% rename from registrasion/conditions.py rename to registrasion/controllers/conditions.py diff --git a/registrasion/invoice.py b/registrasion/controllers/invoice.py similarity index 100% rename from registrasion/invoice.py rename to registrasion/controllers/invoice.py diff --git a/registrasion/controllers.py b/registrasion/controllers/product.py similarity index 100% rename from registrasion/controllers.py rename to registrasion/controllers/product.py diff --git a/registrasion/tests/test_cart.py b/registrasion/tests/test_cart.py index d994d3d4..7cec8bf5 100644 --- a/registrasion/tests/test_cart.py +++ b/registrasion/tests/test_cart.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController +from registrasion.controllers.cart import CartController from patch_datetime import SetTimeMixin diff --git a/registrasion/tests/test_ceilings.py b/registrasion/tests/test_ceilings.py index 8e5f60d8..1e0ba3d4 100644 --- a/registrasion/tests/test_ceilings.py +++ b/registrasion/tests/test_ceilings.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController +from registrasion.controllers.cart import CartController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_discount.py b/registrasion/tests/test_discount.py index 0199ac52..8d93b64f 100644 --- a/registrasion/tests/test_discount.py +++ b/registrasion/tests/test_discount.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController +from registrasion.controllers.cart import CartController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_enabling_condition.py b/registrasion/tests/test_enabling_condition.py index 9e6b8966..60b1a64b 100644 --- a/registrasion/tests/test_enabling_condition.py +++ b/registrasion/tests/test_enabling_condition.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController +from registrasion.controllers.cart import CartController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_invoice.py b/registrasion/tests/test_invoice.py index 323a425e..7dd5aaa5 100644 --- a/registrasion/tests/test_invoice.py +++ b/registrasion/tests/test_invoice.py @@ -8,8 +8,8 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController -from registrasion.invoice import InvoiceController +from registrasion.controllers.cart import CartController +from registrasion.controllers.invoice import InvoiceController from test_cart import RegistrationCartTestCase diff --git a/registrasion/tests/test_voucher.py b/registrasion/tests/test_voucher.py index 0c9e362c..3f52db7b 100644 --- a/registrasion/tests/test_voucher.py +++ b/registrasion/tests/test_voucher.py @@ -8,7 +8,7 @@ from django.test import TestCase from django.utils import timezone from registrasion import models as rego -from registrasion.cart import CartController +from registrasion.controllers.cart import CartController from test_cart import RegistrationCartTestCase