Permalink
Browse files

Correct behavior with default settings

  • Loading branch information...
1 parent fdfda16 commit ff460bd1492edabc7c1952307487c0d4b4ec0528 @dcramer committed Feb 17, 2012
Showing with 11 additions and 4 deletions.
  1. +4 −1 logan/runner.py
  2. +6 −2 logan/settings.py
  3. +1 −1 setup.py
View
5 logan/runner.py
@@ -15,7 +15,8 @@
import re
import sys
-from logan.settings import create_default_settings, load_settings
+from logan.settings import create_default_settings, load_settings, \
+ add_settings
def sanitize_name(project):
@@ -120,7 +121,9 @@ def run_app(project=None, default_config_path=None, default_settings=None,
if default_settings:
settings_mod = import_module(default_settings)
+ # TODO: logan should create a proxy module for its settings
management.setup_environ(settings_mod)
+ add_settings(settings_mod)
load_settings(config_path)
View
8 logan/settings.py
@@ -44,11 +44,15 @@ def load_settings(filename, silent=False):
e.strerror = 'Unable to load configuration file (%s)' % e.strerror
raise
- tuple_settings = ('INSTALLED_APPS', 'TEMPLATE_DIRS')
-
if not settings.configured:
settings.configure()
+ add_settings(mod)
+
+
+def add_settings(mod):
+ tuple_settings = ('INSTALLED_APPS', 'TEMPLATE_DIRS')
+
for setting in dir(mod):
if setting == setting.upper():
setting_value = getattr(mod, setting)
View
2 setup.py
@@ -14,7 +14,7 @@
setup(
name='logan',
- version='0.1.1',
+ version='0.2.0',
author='David Cramer',
author_email='dcramer@gmail.com',
url='http://github.com/dcramer/logan',

0 comments on commit ff460bd

Please sign in to comment.