1. Ryan Wilcox
  2. wd_django_bootstrap


Ryan Wilcox  committed ac8b639

found bug with user settings not being named same all over

  • Participants
  • Parent commits 1f54872
  • Branches default

Comments (0)

Files changed (2)

File setups/project/user_setup_switch.py

View file
 def do_user_setup_switch(root_path, project_path):
     # first, copy over our user_setup.py
     filecopy( os.path.join(root_path, "supporting", "user_setup_template.py"),
-            os.path.join(project_path, "user_setup.py") )
+            os.path.join(project_path, "settings_user.py") )
     # and change settings.py to pull our user setup in...
     applypatch( os.path.join(root_path, "supporting", "user_setup.diff"),

File supporting/user_setup.diff

View file
 +# used for INSTALLED_APPS and things we don't want to change.
 +# There may be an established pattern for this in the Django world, but
-+# I'm just going to do it my way for now: load a user_settings.py, if it exists,
++# I'm just going to do it my way for now: load a settings_user.py, if it exists,
 +# into the namespace of this project. It'll override values that are already there
 +# in the namespace, and that's EXACTLY what we want.
 +# WD-rpw 07-05-2010
 +use_local_settings = True
-+    from user_settings import *
++    from settings_user import *
 +except ImportError, e:
 +    use_local_settings = False