> class MyForm(forms.Form):
> def __init__(self, *args, **kwargs):
> request = kwargs.pop('request', None)
> if request:
> self.request = request
> super(MyForm, self).__init__(*args, **kwargs)
>
> ... and in the view:
> myform = MyForm(request.POST, request
On May 23, 2:33 pm, Bobby Roberts wrote:
> > The code you have given is incapable of producing that error - request
> > is passed as a parameter, so will always be defined within the
> > function. Are you sure the error is coming from within the function?
> > Give us the actual traceback that is
x27; % thislength)
return value
Traceback being produced:
global name 'request' is not defined
Request Method: POST
Request URL:
http://sasquatch.beta.ornlfcu.mediapulse.com/manage/content/web-pages/edit/11/
Exception Type: NameError
Exception Value:
file. The intent is to get the current path. However, this
> code results in
>
> global name 'request' is not defined.
>
> Am I missing an import which I should be importing?
The code you have given is incapable of producing that error - request
is passed as a paramete
lobal name 'request' is not defined.
Am I missing an import which I should be importing?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
5 matches
Mail list logo