Base updates for django 1.8
authorMagnus Hagander <magnus@hagander.net>
Thu, 3 Mar 2016 14:57:12 +0000 (15:57 +0100)
committerMagnus Hagander <magnus@hagander.net>
Thu, 3 Mar 2016 14:57:12 +0000 (15:57 +0100)
django/archives/manage.py [deleted file]
django/archives/urls.py
django/archives/wsgi.py [new file with mode: 0644]
django/manage.py [new file with mode: 0755]

diff --git a/django/archives/manage.py b/django/archives/manage.py
deleted file mode 100755 (executable)
index 3e4eedc..0000000
+++ /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)
index 16fc7186410877fa9e7dca0ba5cc23b85d651cff..43b2530a96ccc5583aa74756fa64b15267b92f73 100644 (file)
@@ -1,4 +1,4 @@
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, include, url
 
 # Uncomment the next two lines to enable the admin:
 # from django.contrib import admin
diff --git a/django/archives/wsgi.py b/django/archives/wsgi.py
new file mode 100644 (file)
index 0000000..5d1f214
--- /dev/null
@@ -0,0 +1,16 @@
+"""
+WSGI config for pgarchives 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", "archives.settings")
+
+application = get_wsgi_application()
diff --git a/django/manage.py b/django/manage.py
new file mode 100755 (executable)
index 0000000..b581f38
--- /dev/null
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "archives.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)