I am writing a simple online store on django 1.9 . The following models are available:
tovar/models.py
color (models.model): color = models.charfield (verbose_name = , max_length = 25 , BLANK = false , null = true ) code = models.charfield (Verbose_name = , max_length = 8 , Blank = true , null = true ) Tovar (Models.model): Color = Models.Manytomanyfield (Color, Blank = true ) pre> card/models.py
class car (models.model): color = models.charfield (Verbose_name = , max_length = 25 , Blank = false , null = true ) in the table in the table Cart CART apps is indicated a list of colors of a certain product that should be taken from the tovar (ManyTomanyfield fields) table. If you use the Selectmultiple widget, how to implement the output of Manytomanyfield?
question@mail.ru
·