mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-05-25 23:53:47 +00:00
This introduces a function that wraps django entry points with an error handler so that our own exception can be pretty-printed to an end-user without a large stack-trace. The defined error handler has also been applied to the existing management, wsgi, asgi and fastcgi entry point definitions.
10 lines
410 B
Python
10 lines
410 B
Python
from . import importer
|
|
from .error_handling import with_error_handler
|
|
|
|
importer.install(check_options=True)
|
|
|
|
from django.core.management import (execute_from_command_line as dj_execute_from_command_line, # noqa
|
|
call_command as dj_call_command)
|
|
|
|
execute_from_command_line = with_error_handler(dj_execute_from_command_line)
|
|
call_command = with_error_handler(dj_call_command)
|