From a39f0abee7e8961d950247351cc7ee646ce04104 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Thu, 3 Mar 2016 15:57:12 +0100 Subject: [PATCH] Base updates for django 1.8 --- django/archives/manage.py | 14 -------------- django/archives/urls.py | 2 +- django/archives/wsgi.py | 16 ++++++++++++++++ django/manage.py | 10 ++++++++++ 4 files changed, 27 insertions(+), 15 deletions(-) delete mode 100755 django/archives/manage.py create mode 100644 django/archives/wsgi.py create mode 100755 django/manage.py diff --git a/django/archives/manage.py b/django/archives/manage.py deleted file mode 100755 index 3e4eedc..0000000 --- a/django/archives/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/django/archives/urls.py b/django/archives/urls.py index 16fc718..43b2530 100644 --- a/django/archives/urls.py +++ b/django/archives/urls.py @@ -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 index 0000000..5d1f214 --- /dev/null +++ b/django/archives/wsgi.py @@ -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 index 0000000..b581f38 --- /dev/null +++ b/django/manage.py @@ -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) -- 2.39.5