Of Nikolay Smirnov
Sent: Wednesday, April 3, 2019 1:53 AM
To: Django users
Subject: Re: BaseModelFormSet > _construct_form
I override add_prefix because on client side I use angularjs. In some cases it
is impossible or not easy to use hyphens in the names.
I do not overwrite _construct_f
*_form?
>
>
>
> *From:* django...@googlegroups.com [mailto:
> django...@googlegroups.com ] *On Behalf Of *nikolaysm
> *Sent:* Tuesday, April 2, 2019 9:37 AM
> *To:* Django users
> *Subject:* BaseModelFormSet > _construct_form
>
>
>
> Hello,
>
>
ke...@kjay.net
On Tue, Apr 2, 2019 at 4:12 PM nikolaysm wrote:
> Hello,
>
> In function _construct_form variable "pk_key" is generated as:
> pk_key = "%s-%s" % (self.add_prefix (i), self.model._meta.pk.name) "
>
> So pk_key is not flexible. Because if I overwrite function "add_prefix"
> from
Why are overwriting add_prefix? Why are you overwriting _construct_form?
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of nikolaysm
Sent: Tuesday, April 2, 2019 9:37 AM
To: Django users
Subject: BaseModelFormSet > _construct_form
Hello,
In funct
Hello,
In function _construct_form variable "pk_key" is generated as:
pk_key = "%s-%s" % (self.add_prefix (i), self.model._meta.pk.name) "
So pk_key is not flexible. Because if I overwrite function "add_prefix"
from class "forms.ModelForm", I get error "MultiValueDictKeyError".
My add_prefix
5 matches
Mail list logo