Il giorno sabato 18 febbraio 2017 11:02:25 UTC+1, Carlo Ascani ha scritto:
>
>
>
> Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto:
>>
>> Hi Carlos,
>> You probably want to create a new widget and override its
>> label_from_instance method.
>>
>> class BModelMultiple
Il giorno venerdì 17 febbraio 2017 20:09:15 UTC+1, Matthew Pava ha scritto:
>
> Hi Carlos,
> You probably want to create a new widget and override its
> label_from_instance method.
>
> class BModelMultipleChoiceField(forms.ModelMultipleChoiceField):
> def label_from_instance(self, obj
')))
-Original Message-
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of Carlo Ascani
Sent: Friday, February 17, 2017 12:14 PM
To: django-users@googlegroups.com
Subject: Question about m2m and forms
Hi all,
I have
Hi all,
I have a model A with a m2m to B:
--
class A(models.Model):
to_b = models.ManyToManyField(B)
class B(models.Model):
name = models.CharField(max_length=100)
--
In a view, I am listing A objects and I
4 matches
Mail list logo