mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-10 06:48:19 +02:00
From https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys:
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.
This commit is contained in:
parent
e6e8ef0c85
commit
faebda7b34
2 changed files with 3 additions and 0 deletions
|
|
@ -3,5 +3,6 @@ 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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue