Permalink
Browse files

Migrate to Django 1.4 layout

  • Loading branch information...
nanonyme committed Mar 27, 2012
1 parent b795076 commit 9bdb7d19717ccf7cb41a77a686d4246839db6905
Showing with 13 additions and 17 deletions.
  1. +3 −3 Procfile
  2. +10 −0 manage.py
  3. +0 −14 skel/manage.py
View
@@ -1,3 +1,3 @@
-web: newrelic-admin run-program python skel/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 --max-requests 1000 --settings=settings.prod
-scheduler: python skel/manage.py celeryd -B -E --maxtasksperchild=1000 --settings=settings.prod
-worker: python skel/manage.py celeryd -E --maxtasksperchild=1000 --settings=settings.prod
+web: newrelic-admin run-program python skel/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3 --max-requests 1000 --settings=skel.settings.prod
+scheduler: python skel/manage.py celeryd -B -E --maxtasksperchild=1000 --settings=skel.settings.prod
+worker: python skel/manage.py celeryd -E --maxtasksperchild=1000 --settings=skel.settings.prod
View
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "skel.settings")
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)
View
@@ -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)

0 comments on commit 9bdb7d1

Please sign in to comment.