django_dump_die package

Subpackages

Submodules

django_dump_die.middleware module

Middleware for DumpAndDie.

exception django_dump_die.middleware.DumpAndDie(obj)

Bases: Exception

DumpAndDie Exception. Triggers the middleware exception logic which outputs the alternate dd debug view.

class django_dump_die.middleware.DumpAndDieMiddleware(get_response)

Bases: object

DumpAndDie Middleware.

Allows access to php/laravel-like function dd().

process_exception(request, exception)

Check if exception is of DumpAndDie type. If so, return Debug Response. If not, ignore and allow standard exception handling.

django_dump_die.middleware.dd(obj, index_range=None, deepcopy=False)

Immediately return debug template with info about objects. Includes any objects passed in through dump().

Does nothing if DEBUG != True.

django_dump_die.middleware.dump(obj, index_range=None, deepcopy=False)

Show debug template whenever response finishes. dd() will also include objects from dump().

Does nothing if DEBUG != True

NOTE: Not thread safe, this will collect objects server wide, dumped objects can come from multiple requests.

django_dump_die.urls module

DjangoDumpDie example URL Configuration. Used exclusively to show example output.

django_dump_die.views module

Module contents