manage.py
author nishanth
Sat, 17 Jul 2010 02:05:43 +0530
branchanoop
changeset 135 f0bc4f5ee0ab
parent 0 d2b78840bfcb
permissions -rw-r--r--
fixed a typo
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     1
#!/usr/bin/env python
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     2
from django.core.management import execute_manager
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     3
try:
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     4
    import settings # Assumed to be in the same directory.
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     5
except ImportError:
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     6
    import sys
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     7
    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__)
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     8
    sys.exit(1)
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
     9
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
    10
if __name__ == "__main__":
d2b78840bfcb initial commit
nishanth
parents:
diff changeset
    11
    execute_manager(settings)