forked from DigitalCampus/django-oppia
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
17 lines (15 loc) · 698 Bytes
/
manage.py
File metadata and controls
17 lines (15 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
is_test = 'test' in sys.argv or 'test _coverage' in sys.argv # Covers regular testing and django-coverage
settings = 'oppiamobile.settings_test' if is_test else 'oppiamobile.settings'
os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings)
try:
from django.core.management import execute_from_command_line
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?")
execute_from_command_line(sys.argv)