[Answered ]-Trying to get enum style choices= working for django but the whole tuplets are appearing in the drop down

2đź‘Ť

âś…

It looks like this is an issue in Django/appengine support. It’s documented here on the google-app-engine-django bug tracker, but it’s closed as “wontfix” there. It is also documented here on the googleappengine bug tracker and is closed as invalid.

According to the docs, the appengine choices parameter works different than the Django one. You do not appear to be able to do what you want without creating a custom widget. According to Guido’s comment closing the googleappengine ticket,

I realize that this may cause problems
when you’re trying to create a form
from the model, but the solution is to
override the form field using a custom
widget and passing the list of desired
choices to the widget. (There’s an
example of this in Rietveld, in
codereview/views.py, class
SettingForm.)

👤Rick Copeland

Leave a comment