Re: using a foreign key with multiple choices

2018-11-13 Thread Jani Tiainen
Well categoriederecette is a foereign key to your Categorie model. Your models don't make any real sense. If your categories are fixed you can remove foreign key and add charfield and definitions directly to Recette model. If you expect that categories are added, changed, created or deleted

Re: using a foreign key with multiple choices

2018-11-13 Thread amit pant
use dict in * LISTE_CHOIX.* On Tue, Nov 13, 2018 at 6:14 PM 'Christian' via Django users < django-users@googlegroups.com> wrote: > Hello > > I need to use a model form to create a new instance of Recette, using > multiple choices list instead of the foreign_key > > *class

using a foreign key with multiple choices

2018-11-13 Thread 'Christian' via Django users
Hello I need to use a model form to create a new instance of Recette, using multiple choices list instead of the foreign_key /class Recette(models.Model):// //  ..// //    categoriederecette = models.ForeignKey(Categorie, on_delete=models.CASCADE) // / /class Categorie(models.Model)://