manage.py 592 Bytes
Newer Older
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
1
2
3
4
#!/usr/bin/env python
import os
import sys

Guilhem Saurel's avatar
Guilhem Saurel committed
5
6
from ndh.utils import get_env

Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
7
8
if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dashboard.settings")
Guilhem Saurel's avatar
Guilhem Saurel committed
9
    get_env()
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
10
11
12
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
Guilhem Saurel's avatar
yapf    
Guilhem Saurel committed
13
14
15
        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?") from exc
Guilhem Saurel's avatar
initial  
Guilhem Saurel committed
16
    execute_from_command_line(sys.argv)