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
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
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)://
3 matches
Mail list logo