Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices.

This commit is contained in:
Nick Pope 2023-08-31 02:57:40 +01:00 committed by GitHub
parent 68a8996bdf
commit 500e01073a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 822 additions and 249 deletions

View file

@ -47,11 +47,11 @@ news application with an ``Article`` model::
from django.db import models
STATUS_CHOICES = [
("d", "Draft"),
("p", "Published"),
("w", "Withdrawn"),
]
STATUS_CHOICES = {
"d": "Draft",
"p": "Published",
"w": "Withdrawn",
}
class Article(models.Model):