Re: Accessing Request Object in Form Definition

2016-02-23 Thread Chris Kavanagh
Thank you so much, James. . .I greatly appreciate you taking the time to answer! On Tuesday, February 23, 2016 at 1:50:57 AM UTC-5, James Schneider wrote: > > On Mon, Feb 22, 2016 at 10:23 PM, Chris Kavanagh > wrote: > >> To possibly answer my own question, thinking out

Re: Accessing Request Object in Form Definition

2016-02-22 Thread James Schneider
On Mon, Feb 22, 2016 at 10:23 PM, Chris Kavanagh wrote: > To possibly answer my own question, thinking out loud, we have to override > the Form Constructor so we can pass in the Request from the view when > instantiating the Form? > You beat me to it. Yes, you would need to

Re: Accessing Request Object in Form Definition

2016-02-22 Thread Chris Kavanagh
To possibly answer my own question, thinking out loud, we have to override the Form Constructor so we can pass in the Request from the view when instantiating the Form? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Accessing Request Object in Form Definition

2016-02-22 Thread Chris Kavanagh
I'm trying to understand how overriding the Constructor of a Form (forms.Form or model.Models) allows you to access the Request Object? How does overriding __init__ allow one access to the Request? I've looked at BaseForm and don't see the Request in the Constructor. So, I don't get it. I