Commit e3afa3ee authored by chris's avatar chris

manage.py: assume dev instance by default (instance settings are set according to directory name)

parent 4f5b9ae7
......@@ -7,6 +7,10 @@ if __name__ == "__main__":
os_environ = "DJANGO_SETTINGS_MODULE"
project = os.path.split(os.path.abspath(os.path.dirname(__file__)))[-1]
# Settings are set according to directory name
# Assume developement environment by default
if project == 'repanier':
project = 'mysite'
django_settings = "%s.common_settings" % project
os.environ.setdefault(os_environ, django_settings)
if os.environ.get(os_environ) != django_settings:
......@@ -15,4 +19,4 @@ if __name__ == "__main__":
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
\ No newline at end of file
execute_from_command_line(sys.argv)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment