1
0
Fork 1
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.
This commit is contained in:
Fleur Dragan 2022-08-16 15:26:29 -05:00
parent e6e8ef0c85
commit faebda7b34
2 changed files with 3 additions and 0 deletions

View file

@ -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")