root / commissioning / servers / fscrud / manage.py @ 9f1a1bd0
History | View | Annotate | Download (691 Bytes)
1 |
#!/usr/bin/python2.7
|
---|---|
2 |
from os import environ |
3 |
from os.path import basename |
4 |
from sys import argv |
5 |
|
6 |
|
7 |
environ['COMMISSIONING_APP_NAME'] = 'fscrud' |
8 |
|
9 |
from django.core.management import execute_manager |
10 |
try:
|
11 |
import settings # Assumed to be in the same directory. |
12 |
except ImportError: |
13 |
import sys |
14 |
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__)
|
15 |
sys.exit(1)
|
16 |
|
17 |
if __name__ == "__main__": |
18 |
from sys import path |
19 |
execute_manager(settings) |