/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

  1. #!/usr/bin/env python
  2. from django.core.management import execute_manager
  3. from django.conf import import_settings_module_with_extras
  4. import imp
  5. try:
  6. imp.find_module('settings') # Assumed to be in the same directory.
  7. except ImportError:
  8. import sys
  9. print "hello"
  10. 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__)
  11. sys.exit(1)
  12. import settings
  13. if __name__ == "__main__":
  14. execute_manager(settings)