Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

896 B
Raw Blame
"""Application configurations of the audit facility."""

from django.apps import AppConfig
from django.contrib.admin.apps import AdminConfig
from django.utils.module_loading import autodiscover_modules

from .signals import connect_auth_signals


class AuditConfig(AppConfig):
    """Audit Django's authentication signals and load the project's declarations."""

    name = "core.audit"
    label = "audit"

    def ready(self):
        """Connect the login, failed login and logout receivers.

        Then import the ``audit_registry`` module of every installed app, where
        the project registers its models and authentication classes.
        """
        connect_auth_signals()
        autodiscover_modules("audit_registry")


class AuditedAdminConfig(AdminConfig):
    """Serve the admin from the site that audits every write."""

    default_site = "core.audit.admin.AuditedAdminSite"