mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-05-17 20:11:08 +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.
11 lines
324 B
Python
11 lines
324 B
Python
from . import importer
|
|
from .error_handling import with_error_handler
|
|
|
|
importer.install()
|
|
|
|
from django.core.wsgi import get_wsgi_application as dj_get_wsgi_application # noqa: E402
|
|
|
|
get_wsgi_application = with_error_handler(dj_get_wsgi_application)
|
|
|
|
# this is just for the crazy ones
|
|
application = get_wsgi_application()
|