mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #31262 -- Added support for mappings on model fields and ChoiceField's choices.
This commit is contained in:
@@ -173,11 +173,11 @@ Consider this set of models::
|
||||
from django.db import models
|
||||
from django.forms import ModelForm
|
||||
|
||||
TITLE_CHOICES = [
|
||||
("MR", "Mr."),
|
||||
("MRS", "Mrs."),
|
||||
("MS", "Ms."),
|
||||
]
|
||||
TITLE_CHOICES = {
|
||||
"MR": "Mr.",
|
||||
"MRS": "Mrs.",
|
||||
"MS": "Ms.",
|
||||
}
|
||||
|
||||
|
||||
class Author(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user