Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 15 lines (13 sloc) 0.708 kB
fed8ec6 @emesik Initial revision
emesik authored
1 #!/usr/bin/env python
4c820ca @emesik Cleaned up more fertilizer
emesik authored
2 import os
3 from django.core.management import setup_environ, ManagementUtility
fed8ec6 @emesik Initial revision
emesik authored
4 try:
3af05a4 @spookylukey Converted tabs to spaces, and other PEP8 whitespace fixes
authored
5 import settings # Assumed to be in the same directory.
fed8ec6 @emesik Initial revision
emesik authored
6 except ImportError:
3af05a4 @spookylukey Converted tabs to spaces, and other PEP8 whitespace fixes
authored
7 import sys
8 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(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
9 sys.exit(1)
fed8ec6 @emesik Initial revision
emesik authored
10
11 if __name__ == "__main__":
3af05a4 @spookylukey Converted tabs to spaces, and other PEP8 whitespace fixes
authored
12 setup_environ(settings, original_settings_path=os.environ.get('DJANGO_SETTINGS_MODULE', 'settings'))
13 utility = ManagementUtility(None)
14 utility.execute()
Something went wrong with that request. Please try again.