/django/conf/project_template/manage.py
https://code.google.com/p/mango-py/ · Python · 16 lines · 13 code · 2 blank · 1 comment · 3 complexity · ce058664837b8d22ba8076c400e13b7b MD5 · raw file
- #!/usr/bin/env python
- from django.core.management import execute_manager
- from django.conf import import_settings_module_with_extras
- import imp
- try:
- imp.find_module('settings') # Assumed to be in the same directory.
- except ImportError:
- import sys
- print "hello"
- sys.stderr.write("Bad 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)