InvenTree/InvenTree/manage.py
Matthias Mair 64dbf8c1e3
[FR] Add tracing support (#6211)
* [FR] Add tracing support
Fixes #6208

* move checks out of manage.py

* fixed reqs

* small cleanup

* move tracing init to settings
similar to how sentry is handled

* rephrase

* clean up imports

* added argument regarding console debugging

* fix typing

* added auth section

* remove empty headers

* made protocol configurable

* rename vars & cleanup template

* more docs for template

* add docs
2024-01-18 17:50:05 +11:00

25 lines
671 B
Python
Executable File

#!/usr/bin/env python
"""InvenTree / django management commands."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'InvenTree.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc: # pragma: no cover
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
execute_from_command_line(sys.argv)
if __name__ == '__main__':
main()