Hello,
I remember that, as a beginner Django developer, I stumbled upon the
`choices` attribute of `models.CharField`.
Could we allow lists to be passed to choices ?
`choices=['potato', 'carrot', 'turnip']`
Which would be the same as this :
`choices=[('potato', 'potato'), ('carrot', 'potato'), ('turnip', 'potato')]`
I understand that storing long strings in the database is not ideal.
However, it feels like premature optimization that isn't very relevant to
new Django users. Choices are needed very often in any kind of basic CRUD
app, and this is something new users will often encounter quite early in
their Django learning. Allowing a simple list input would reduce the
cognitive load and make Django easier to learn.
Do you think this makes sense ?
--
You received this message because you are subscribed to the Google Groups
"Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-developers/53f30e25-2b05-4573-91a7-a3be013b3286%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.