Browse Source

Implement AppConfig objects for non-dashboard apps

Also register the signal receivers in the ready() method for 1.7+
master
Michael van Tellingen 11 years ago
parent
commit
6503eb53b2

+ 1
- 0
oscar/apps/address/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.address.config.AddressConfig'

+ 7
- 0
oscar/apps/address/config.py View File

@@ -0,0 +1,7 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class AddressConfig(AppConfig):
5
+    label = 'address'
6
+    name = 'oscar.apps.address'
7
+

+ 1
- 0
oscar/apps/analytics/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.analytics.config.AnalyticsConfig'

+ 9
- 0
oscar/apps/analytics/config.py View File

@@ -0,0 +1,9 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class AnalyticsConfig(AppConfig):
5
+    label = 'analytics'
6
+    name = 'oscar.apps.analytics'
7
+
8
+    def ready(self):
9
+        from . import receivers  # noqa

+ 1
- 0
oscar/apps/basket/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.basket.config.BasketConfig'

+ 6
- 0
oscar/apps/basket/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class BasketConfig(AppConfig):
5
+    label = 'basket'
6
+    name = 'oscar.apps.basket'

+ 2
- 0
oscar/apps/catalogue/__init__.py View File

@@ -0,0 +1,2 @@
1
+default_app_config = 'oscar.apps.catalogue.config.CatalogueConfig'
2
+

+ 9
- 0
oscar/apps/catalogue/config.py View File

@@ -0,0 +1,9 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class CatalogueConfig(AppConfig):
5
+    label = 'catalogue'
6
+    name = 'oscar.apps.catalogue'
7
+
8
+    def ready(self):
9
+        from . import receivers  # noqa

+ 1
- 0
oscar/apps/checkout/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.checkout.config.CheckoutConfig'

+ 6
- 0
oscar/apps/checkout/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class CheckoutConfig(AppConfig):
5
+    label = 'checkout'
6
+    name = 'oscar.apps.checkout'

+ 1
- 0
oscar/apps/customer/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.customer.config.CustomerConfig'

+ 6
- 0
oscar/apps/customer/apps.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class CustomerConfig(AppConfig):
5
+    app_label = 'customer'
6
+    name = 'oscar.apps.customer'

+ 10
- 0
oscar/apps/customer/config.py View File

@@ -0,0 +1,10 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class CustomerConfig(AppConfig):
5
+    label = 'customer'
6
+    name = 'oscar.apps.customer'
7
+
8
+    def ready(self):
9
+        from oscar.apps.customer.history import *  # noqa
10
+        from .alerts import receivers  # noqa

+ 1
- 0
oscar/apps/dashboard/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.dashboard.config.DashboardConfig'

+ 6
- 0
oscar/apps/dashboard/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class DashboardConfig(AppConfig):
5
+    label = 'dashboard'
6
+    name = 'oscar.apps.dashboard'

+ 1
- 0
oscar/apps/offer/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.offer.config.OfferConfig'

+ 6
- 0
oscar/apps/offer/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class OfferConfig(AppConfig):
5
+    label = 'offer'
6
+    name = 'oscar.apps.offer'

+ 6
- 0
oscar/apps/order/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class OrderConfig(AppConfig):
5
+    label = 'order'
6
+    name = 'oscar.apps.order'

+ 1
- 0
oscar/apps/partner/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.partner.config.PartnerConfig'

+ 9
- 0
oscar/apps/partner/config.py View File

@@ -0,0 +1,9 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class PartnerConfig(AppConfig):
5
+    label = 'partner'
6
+    name = 'oscar.apps.partner'
7
+
8
+    def ready(self):
9
+        from . import receivers  # noqa

+ 1
- 0
oscar/apps/payment/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.payment.config.PaymentConfig'

+ 6
- 0
oscar/apps/payment/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class PaymentConfig(AppConfig):
5
+    label = 'payment'
6
+    name = 'oscar.apps.payment'

+ 1
- 0
oscar/apps/promotions/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.promotions.config.PromotionsConfig'

+ 6
- 0
oscar/apps/promotions/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class PromotionsConfig(AppConfig):
5
+    label = 'promotions'
6
+    name = 'oscar.apps.promotions'

+ 1
- 0
oscar/apps/search/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.search.config.SearchConfig'

+ 6
- 0
oscar/apps/search/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class SearchConfig(AppConfig):
5
+    label = 'search'
6
+    name = 'oscar.apps.search'

+ 1
- 0
oscar/apps/shipping/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.shipping.config.ShippingConfig'

+ 6
- 0
oscar/apps/shipping/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class ShippingConfig(AppConfig):
5
+    label = 'shipping'
6
+    name = 'oscar.apps.shipping'

+ 1
- 0
oscar/apps/voucher/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.voucher.config.VoucherConfig'

+ 9
- 0
oscar/apps/voucher/config.py View File

@@ -0,0 +1,9 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class VoucherConfig(AppConfig):
5
+    label = 'voucher'
6
+    name = 'oscar.apps.voucher'
7
+
8
+    def ready(self):
9
+        from . import receivers  # noqa

+ 1
- 0
oscar/apps/wishlists/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'oscar.apps.wishlists.config.WishlistsConfig'

+ 6
- 0
oscar/apps/wishlists/config.py View File

@@ -0,0 +1,6 @@
1
+from django.apps import AppConfig
2
+
3
+
4
+class WishlistsConfig(AppConfig):
5
+    label = 'wishlists'
6
+    name = 'oscar.apps.wishlists'

+ 1
- 0
tests/_site/apps/customer/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'tests._site.apps.customer.config.CustomerConfig'

+ 5
- 0
tests/_site/apps/customer/config.py View File

@@ -0,0 +1,5 @@
1
+from oscar.apps.customer import config
2
+
3
+
4
+class CustomerConfig(config.CustomerConfig):
5
+    name = 'tests._site.apps.customer'

+ 1
- 0
tests/_site/apps/partner/__init__.py View File

@@ -0,0 +1 @@
1
+default_app_config = 'tests._site.apps.partner.config.PartnerConfig'

+ 5
- 0
tests/_site/apps/partner/config.py View File

@@ -0,0 +1,5 @@
1
+from oscar.apps.partner import config
2
+
3
+
4
+class PartnerConfig(config.PartnerConfig):
5
+    name = 'tests._site.apps.partner'

Loading…
Cancel
Save