Browse files

Added some missing bits for previous commit

  • Loading branch information...
1 parent 25edb4d commit b1b07a7b2db499f810481afe2fc1a3a7f2452cdf @brosner brosner committed Jan 24, 2013
Showing with 21 additions and 0 deletions.
  1. +1 −0 project_name/settings.py
  2. +20 −0 project_name/startup.py
View
1 project_name/settings.py
@@ -131,6 +131,7 @@
"django_forms_bootstrap",
# project
+ "{{ project_name }}",
]
# A sample logging configuration. The only tangible logging
View
20 project_name/startup.py
@@ -0,0 +1,20 @@
+import copy
+
+from django.conf import settings
+from django.utils.importlib import import_module
+from django.utils.module_loading import module_has_submodule
+
+
+def autoload(submodules):
+ for app in settings.INSTALLED_APPS:
+ mod = import_module(app)
+ for submodule in submodules:
+ try:
+ import_module("{}.{}".format(app, submodule))
+ except:
+ if module_has_submodule(mod, submodule):
+ raise
+
+
+def run():
+ autoload(["receivers"])

0 comments on commit b1b07a7

Please sign in to comment.