Re: Django pass User instance to Forms when form is created

2015-10-14 Thread Tim Graham
Please write to django-users, this mailing list is for the development of Django itself. On Wednesday, October 14, 2015 at 2:50:56 AM UTC-7, Ernest Appiah wrote: > > > > > I have a Django form and l would like to pass a user instance when the > form is created > > *First Approach* > > This is wh

Django pass User instance to Forms when form is created

2015-10-14 Thread Ernest Appiah
I have a Django form and l would like to pass a user instance when the form is created *First Approach* This is where l create the form and pass the instance of the user: form = QuestionForm(request.user, request.POST) And inside the QuestionForm def __init__(self, user, *args, **kwargs):