Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
rip hack out of manage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy McKay committed Oct 2, 2012
1 parent f49193f commit d5d5bd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/utils.py
Expand Up @@ -6,6 +6,12 @@
# get the right settings module
import imp
settingmodule = os.environ.get('DJANGO_SETTINGS_MODULE', 'settings_local')
if settingmodule.startswith(('zamboni', # typical git clone destination
'workspace', # Jenkins
'project', # vagrant VM
'freddo')):
settingmodule = settingmodule.split('.', 1)[1]

res = imp.find_module(settingmodule)
settings = imp.load_module(settingmodule, *res)

Expand Down

0 comments on commit d5d5bd3

Please sign in to comment.