src/hdalab/manage.py
author ymh <ymh.work@gmail.com>
Fri, 03 Apr 2015 18:41:01 +0200
changeset 618 cb8b833ad122
parent 271 8f77cf71ab02
permissions -rw-r--r--
correct celery errors
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
114
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
#!/usr/bin/env python
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
# -*- coding: utf-8 -*-
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from django.core.management import execute_manager
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
import imp
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
try:
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
    imp.find_module('settings') # Assumed to be in the same directory.
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
except ImportError:
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    import sys
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    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" % __file__)
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    sys.exit(1)
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
import settings
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
if __name__ == "__main__":
c59383cc9940 migrate categories extraction to hdalab
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    execute_manager(settings)