Permalink
Browse files

manage.py: switched to Django 1.4 style

  • Loading branch information...
trey0 committed Apr 5, 2012
1 parent caac091 commit f188cf586b802a8c7579be38c9e733470bc39da1
Showing with 5 additions and 8 deletions.
  1. +5 −8 manage.py
View
@@ -19,12 +19,9 @@
if ret != 0 or extraArgs:
sys.exit(ret)
-from django.core.management import execute_manager
-try:
- import settings # Assumed to be in the same directory.
-except ImportError:
- sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
- sys.exit(1)
-
if __name__ == "__main__":
- execute_manager(settings)
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "geocamShare.settings")
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)

0 comments on commit f188cf5

Please sign in to comment.