aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBeth Flanagan <elizabeth.flanagan@intel.com>2015-01-13 11:39:49 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2015-01-14 11:34:11 +0000
commit5b7e7f23fc6200b031b189bc221ce0aef18bf72b (patch)
tree0652878ff4371d77b705229e44029d144798402e
parent787d06676190a2d2daf8cda6f8e748a0fc460b86 (diff)
downloadbuildhistory-web-5b7e7f23fc6200b031b189bc221ce0aef18bf72b.tar.gz
buildhistory-web-5b7e7f23fc6200b031b189bc221ce0aef18bf72b.tar.bz2
buildhistory-web-5b7e7f23fc6200b031b189bc221ce0aef18bf72b.zip
manage.py: Updating to Django 1.6.x
Django 1.6.x no longer supports execute_manager which was deprecated in Django 1.4 and removed in 1.6 per the depreciation timeline: https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3 Updated to a more recent manage.py Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
-rw-r--r--manage.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/manage.py b/manage.py
index dd69035..66d17a7 100644
--- a/manage.py
+++ b/manage.py
@@ -6,17 +6,14 @@
#
# Copyright (c) Django Software Foundation and individual contributors.
# All rights reserved.
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
-from django.core.management import execute_manager
-import imp
-try:
- imp.find_module('settings') # Assumed to be in the same directory.
-except ImportError:
- import sys
- 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" % __file__)
- sys.exit(1)
+ from django.core.management import execute_from_command_line
-import settings
+ execute_from_command_line(sys.argv)
-if __name__ == "__main__":
- execute_manager(settings)