-
Notifications
You must be signed in to change notification settings - Fork 87
/
manage.py
executable file
·19 lines (16 loc) · 805 Bytes
/
manage.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "freesound.settings")
if '--settings=freesound.test_settings' not in sys.argv:
from django.conf import settings
if settings.DEBUG:
if (os.environ.get('RUN_MAIN') or os.environ.get('WERKZEUG_RUN_MAIN')) and not os.environ.get('DISABLE_DEBUGPY'):
import debugpy
debugpy.listen((settings.DEBUGGER_HOST, settings.DEBUGGER_PORT))
print(f'Debugger ready and listening at http://{settings.DEBUGGER_HOST}:{settings.DEBUGGER_PORT}/')
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)