/django/conf/project_template/manage.py
Python | 16 lines | 13 code | 2 blank | 1 comment | 1 complexity | ce058664837b8d22ba8076c400e13b7b MD5 | raw file
Possible License(s): BSD-3-Clause
1#!/usr/bin/env python 2from django.core.management import execute_manager 3from django.conf import import_settings_module_with_extras 4import imp 5try: 6 imp.find_module('settings') # Assumed to be in the same directory. 7except 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 13import settings 14 15if __name__ == "__main__": 16 execute_manager(settings)