Re: Need help with inlineformset

2020-10-11 Thread Marco Paradisi
up Il giorno domenica 11 ottobre 2020 alle 17:37:15 UTC+2 Marco Paradisi ha scritto: > Hi everyone, > > I have the following instruction: > > forms.models.inlineformset_factory(Covata, Bird, fields=('rna_ucc', > 'sesso', 'nascita', 'anella', 'razza', 'mutazione', 'portatore

Need help with inlineformset

2020-10-11 Thread Marco Paradisi
Hi everyone, I have the following instruction: forms.models.inlineformset_factory(Covata, Bird, fields=('rna_ucc', 'sesso', 'nascita', 'anella', 'razza', 'mutazione', 'portatore',), can_delete=True, extra=1) I want to initialize two fields of the model "Bird" to values taken from the form of

Limit the choices for a ForeignKey

2020-09-27 Thread Marco Paradisi
Hi Everyone! I need to filter the choices for a foreign key. My Model has an attribute SEX that could be M or F, and two Foreign keys ( FATHER and MOTHER ), I want both filtered for sex. How can I achieve it? Thanks in advance -- You received this message because you are subscribed to the