Skip to content
Advertisement

how to select more options in “ManyToManyField()”?

i wanted to create a tag option for a a music model , well mainly musics accept more than one tag and there are amny kind of genres and tags ,so i wanted to make a ManyToManyField() that you can set more than 1 value ,also if you tag is not in add it in. to do that i thought maybe can make another CharField() then adding it to tag_name :

JavaScript

but i stuck here too ,i really dont know how to add a models field data to another models field ? i would appreciate if you guide me here

Advertisement

Answer

For a user to select more than one tag, they simply have to ctrl then click on the tags. For Android I suppose it’s long-pressing. For adding a tag if it’s not in the models, you don’t need a field for that. In the admin, you can just click on the + sign.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement