summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2016-01-06 15:28:25 +0000
committerMagnus Hagander2016-01-06 15:28:25 +0000
commita67145e1987e229d832215203fbb5fe1faf9ec12 (patch)
tree96dfea5ccfec9d2d5dabed6259664b0db7447a1b
parentdc61e30ab8329093150a1eb9333b1409986a07c6 (diff)
Move around manage.py and create wsgi.py for django 1.8
-rwxr-xr-xmanage.py10
-rwxr-xr-xpgcommitfest/manage.py14
-rw-r--r--pgcommitfest/wsgi.py16
3 files changed, 26 insertions, 14 deletions
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..55f994c
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pgcommitfest.settings")
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)
diff --git a/pgcommitfest/manage.py b/pgcommitfest/manage.py
deleted file mode 100755
index 3e4eedc..0000000
--- a/pgcommitfest/manage.py
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python
-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)
-
-import settings
-
-if __name__ == "__main__":
- execute_manager(settings)
diff --git a/pgcommitfest/wsgi.py b/pgcommitfest/wsgi.py
new file mode 100644
index 0000000..821a477
--- /dev/null
+++ b/pgcommitfest/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for pgcommitfest 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", "pgcommitfest.settings")
+
+application = get_wsgi_application()