Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_command_exception-1.0.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page