Source code for superdjango.db.default.models

# Imports

from django.db import models
from django.utils.translation import gettext_lazy as _
from .mixins import DefaultMixin

# Exports

# Models


[docs]class DefaultModel(DefaultMixin): """Allows a record to be marked as "default". This model is an implementation of :py:class`superdjango.db.default.mixins.DefaultMixin`, providing an ``is_default`` field. """ is_default = models.NullBooleanField( _("default"), help_text=_("Indicates that this is the default record.") ) class Meta: abstract = True