-
Notifications
You must be signed in to change notification settings - Fork 194
/
manage.py
executable file
·24 lines (18 loc) · 762 Bytes
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
if os.environ.get('DJANGO_SETTINGS_MODULE') is None:
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings.base'
# When using an on-disk database for the test suite,
# Django asks us if we want to delete the database.
# We do.
if 'test' in sys.argv[0:3]:
# Catch warnings in tests and redirect them to be handled by the test runner. Otherwise build results are too
# noisy to be of much use.
import logging
logging.captureWarnings(True)
sys.argv.append('--noinput')
sys.argv.append('--logging-clear-handlers')
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)