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
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):
return "%s (%s)" % (obj, obj.count_a)
And then you'll want to change your
3 matches
Mail list logo