python - NameError: name 'form' is not defined -


i trying return custom form controller method given below:

searchform=sqlform.factory(     field('uid', requires=is_not_empty()),     field('uaccount', requires=is_not_empty()))     if searchform.accepts(request,session):     response.flash = 'form accepted' elif searchform.errors:     response.flash = 'form has errors'        else:     response.flash = 'please fill form' return dict(form=searchform) 

in index.html, have written following code render form:

{{=form.custom.begin}} {{=form.custom.widget.uid}}  {{=form.custom.widget.uaccount}}  {{=form.custom.submit}} {{=form.custom.end}}  

but error message : nameerror: name 'form' not defined

i have checked response using response._vars, contains form gluon.sqlhtml.sqlform object @ 0x07d5efb0


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -