On Mon, Feb 22, 2016 at 10:23 PM, Chris Kavanagh <cka...@gmail.com> 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 override __init__() to include the request in to your form class. Be sure to keep it out of your args/kwargs that are passed on to your super() call, though, as it will confuse the parent form class (if I remember correctly when I did the same thing). If you are using CBV's, that you'll need to override get_form() as well in order to return the form with the self.request as one of the arguments being passed in. -James -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWRm5muqDY75_tCh%2BfroAsT70iAYW%2BCVL__aPAtVoQ4wg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.