diff options
| author | Mitch Riedstra <Mitch@riedstra.us> | 2017-06-28 12:37:02 -0400 |
|---|---|---|
| committer | Mitch Riedstra <Mitch@riedstra.us> | 2017-06-28 12:37:02 -0400 |
| commit | 8312e3b36a3bf2276e98b883bc1dbeb235ca9ffe (patch) | |
| tree | 1e6542ac6a1f696ec3c8c798ee3c1701758f560b /app/manage.py | |
| parent | b2d68c78817f76e0bd01d7f79c3e216c3c8f9e8d (diff) | |
| download | dispatch-tracker-8312e3b36a3bf2276e98b883bc1dbeb235ca9ffe.tar.gz dispatch-tracker-8312e3b36a3bf2276e98b883bc1dbeb235ca9ffe.tar.xz | |
Initial Setup
Diffstat (limited to 'app/manage.py')
| -rwxr-xr-x | app/manage.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/manage.py b/app/manage.py new file mode 100755 index 0000000..7525f87 --- /dev/null +++ b/app/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) |
