Put a 1.8 manage.py and wsgi.py in place in the correct locations
authorMagnus Hagander <magnus@hagander.net>
Tue, 22 Dec 2015 10:04:49 +0000 (11:04 +0100)
committerMagnus Hagander <magnus@hagander.net>
Tue, 22 Dec 2015 10:04:49 +0000 (11:04 +0100)
gitadmin/gitadmin/django.wsgi [deleted file]
gitadmin/gitadmin/manage.py [deleted file]
gitadmin/gitadmin/wsgi.py [new file with mode: 0644]
gitadmin/manage.py [new file with mode: 0755]

diff --git a/gitadmin/gitadmin/django.wsgi b/gitadmin/gitadmin/django.wsgi
deleted file mode 100644 (file)
index 3f39104..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-import os, sys
-
-os.environ['DJANGO_SETTINGS_MODULE'] = 'gitadmin.settings'
-
-import django.core.handlers.wsgi
-application = django.core.handlers.wsgi.WSGIHandler()
diff --git a/gitadmin/gitadmin/manage.py b/gitadmin/gitadmin/manage.py
deleted file mode 100755 (executable)
index 5e78ea9..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env python
-from django.core.management import execute_manager
-try:
-    import 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(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)
diff --git a/gitadmin/gitadmin/wsgi.py b/gitadmin/gitadmin/wsgi.py
new file mode 100644 (file)
index 0000000..b9b2f74
--- /dev/null
@@ -0,0 +1,16 @@
+"""
+WSGI config for gitadmin project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gitadmin.settings")
+
+application = get_wsgi_application()
diff --git a/gitadmin/manage.py b/gitadmin/manage.py
new file mode 100755 (executable)
index 0000000..29ba2d8
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "gitadmin.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)