Re: help with get_form_kwargs

2018-07-16 Thread clavierplayer
temsTestCollection.item" must be a "Item" instance. On Monday, July 16, 2018 at 1:14:41 PM UTC-4, Matthew Pava wrote: > > This StackOverflow question may help you: > > > https://www.google.com/search?q=django+clean_fields+not+called&oq=django+clean_field+not+&aq

RE: help with get_form_kwargs

2018-07-16 Thread Matthew Pava
lf Of clavierpla...@gmail.com Sent: Monday, July 16, 2018 11:27 AM To: Django users Subject: Re: help with get_form_kwargs I would actually prefer to override clean(), but CreateView doesn't appear to have a clean() method that I can override. I did make a ModelForm to use with the CreateView, but th

Re: help with get_form_kwargs

2018-07-16 Thread clavierplayer
user input in the clean methods. > > https://docs.djangoproject.com/en/2.0/ref/forms/validation/ > > > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of * > clavie...@gmail.com > *Sent:* Monday, July 16, 2018 10:28 AM >

RE: help with get_form_kwargs

2018-07-16 Thread Matthew Pava
I would alter user input in the clean methods. https://docs.djangoproject.com/en/2.0/ref/forms/validation/ From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of clavierpla...@gmail.com Sent: Monday, July 16, 2018 10:28 AM To: Django users Subject: help with

help with get_form_kwargs

2018-07-16 Thread clavierplayer
I have a CreateView in which I need to alter the user input. I may have found a way to do so using get_form_kwargs, but I'm puzzled by a couple of things: I know that kwargs['data'] is a QueryDict, which is immutable. So I tried the doc's QueryDict.copy() recommendation: def get_form_kwargs(s