RE: BaseModelFormSet > _construct_form

2019-04-03 Thread Matthew Pava
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

Re: BaseModelFormSet > _construct_form

2019-04-03 Thread Nikolay Smirnov
*_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, > >

Re: BaseModelFormSet > _construct_form

2019-04-02 Thread Kevin Jay
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

RE: BaseModelFormSet > _construct_form

2019-04-02 Thread Matthew Pava
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

BaseModelFormSet > _construct_form

2019-04-02 Thread nikolaysm
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