Settings and Configuration

I decided to not provide a battery of Settings with this app and rather keep everything that needs adjustments in the AppConfig. This is a feature introduced in Django 1.9 and allows you to set settings more programmatically.

Custom Event Types

By default, django-eventlog comes with some default types, but you can override them in a custom Django AppConfig object:

# myproject/
from django.utils.translation import ugettext_lazy as _
from eventlog.apps import EventLogConfig

class CustomEventLogConfig(EventLogConfig):
    def get_event_types(self):
        return {
            'info': {
                'label': _('Info'),
                'color': None,
                'bgcolor': None,
            'oh_crap': {
                'label': _('Oh Crap!'),
                'color': 'red',
                'bgcolor': None,
            'mail_system': {
                'label': _('Mail System'),
                'color': 'blue',
                'bgcolor': None,

    # Use your custom Config instead of ``eventlog.apps.EventLogConfig``

# In your code
e = EventGroup()'Hello World.')
e.oh_crap('Some bad happened')
e.mail_system('Mail sent successfully!')

There are much more settings to override, take a look at the EventLogConfig.