mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
When defining a model, if no field in a model is defined with primary_key=True an implicit primary key is added. The type of this implicit primary key can now be controlled via the DEFAULT_AUTO_FIELD setting and AppConfig.default_auto_field attribute. No more needing to override primary keys in all models. Maintaining the historical behavior, the default value for DEFAULT_AUTO_FIELD is AutoField.
8 lines
238 B
Python
8 lines
238 B
Python
from django.apps import AppConfig
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
|
class MailBoxConfig(AppConfig):
|
|
default_auto_field = 'django.db.models.AutoField'
|
|
name = 'django_mailbox'
|
|
verbose_name = _("Mail Box")
|