views.py  "if statements" recognize that the box was checked.
I am not able to return the checkbox state back to web.html

I would like to see the last checkbox choices in my page.


web.html
<form action="/xxx" method="POST">
 <input type="checkbox" value="checkbox" name=cbSMWord >
</form>

views.py
def xxx(request):
    cbSMWord  = request.POST.get('cbSMWord ','')
    if (cbSMWord): print 'view recognized that checkbox was checked'
#this works

   print 'cbSMWord=', cbSMWord #this gives empty string, why?

   return render_to_response('c:/Python27/Scripts/Spokas/web.html',
{'cbSMWord':cbSMWord}, context_instance = RequestContext(request) )

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to