Django python exception model, admin, logging handler, middleware and excepthook
Project description
Installation
$ pip install django-command-exception
settings.py
INSTALLED_APPS+=['django_command_exception']
Models
model | table | columns/fields |
---|---|---|
CommandException |
django_command_exception |
id,command,exc_class,exc_message,exc_traceback,created_at |
Examples
call_command
from django_command_exception.models import CommandException
try:
call_command(name)
except Exception as e:
CommandException(command=name).save()
BaseCommand
from django_command_exception.models import CommandException
class BaseCommand(BaseCommand):
def execute(self, *args, **options):
try:
return super().execute(*args, **options)
except Exception as e:
CommandException(command=type(self).__module__.split('.')[-1]).save()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django_command_exception-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 055673638675d625b18a408ae547d20e948a438f45e3476f7f1125f796778143 |
|
MD5 | 2517da79c1d15a9c4a383b286d8e5381 |
|
BLAKE2b-256 | 98334896829920fc6261a61004788f3f16a2aac1967f20a707bdc702f9a51f12 |