Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 2.2
Fetching contributors…

Cannot retrieve contributors at this time

executable file 37 lines (27 sloc) 0.998 kb
#!/usr/bin/env python
import os
import site
from django.core.management import execute_manager, setup_environ
ROOT = os.path.dirname(os.path.abspath(__file__))
path = lambda *a: os.path.join(ROOT, *a)
site.addsitedir(path('apps'))
site.addsitedir(path('lib'))
try:
import settings_local as settings
except ImportError:
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write(
"Error: Tried importing 'settings_local.py' and 'settings.py' "
"but neither could be found (or they're throwing an ImportError)."
" Please come back and try again later.")
raise
# The first thing execute_manager does is call `setup_environ`. Logging config
# needs to access settings, so we'll setup the environ early.
setup_environ(settings)
# Import for side-effect: configures our logging handlers.
import log_settings
if __name__ == "__main__":
execute_manager(settings)
Jump to Line
Something went wrong with that request. Please try again.