1👍
✅
There is also a package django-multiselectfield
that might help you with storing multiple (string) values that do not require a separate model.
1👍
Because your favourite_trees
field is a CharField
with choices
, so it only stores one type of tree in TREE_CHOICES
as a string, you cannot directly use MultipleChoiceField
to save it. You should use create a separate model called something like TreeChoice
, then change field favourite_trees
to a ManyToManyField
pointing to that model.
- [Answered ]-Remove trailing data from django timesince — template equivalent
- [Answered ]-Django Transaction did not work
- [Answered ]-ImportError: No module named threadedcommentsdjango_comments while use django-threadedcomments app
Source:stackexchange.com