[Fixed]-Django – Error – Select a valid choice. [<some choice>] is not one of the available choices

1👍

Try

    'types': forms.Select(),
    'visit_times': forms.Select(),

You defined in your model that types and also visit_times can have only one value from the choices. It is possible to get more choices but you have to think about how to save this data to database. Take a look at this:

https://pypi.python.org/pypi/django-multiselectfield/

https://pypi.python.org/pypi/django-select-multiple-field/

👤trantu

Leave a comment