Skip to content

Commit

Permalink
Fixed manage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdwaeter committed Jul 19, 2012
1 parent 2628a3a commit 4ae3723
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/manage.py
@@ -1,10 +1,14 @@
#!/usr/bin/env python
import os
import sys
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)

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")

from django.core.management import execute_from_command_line
import settings

execute_from_command_line(sys.argv)
if __name__ == "__main__":
execute_manager(settings)

0 comments on commit 4ae3723

Please sign in to comment.