On 2 sep, 22:47, Bobby Roberts <[EMAIL PROTECTED]> wrote: > interesting situation. I've got a form
'form' as a django.forms.Form instance or as a plain html form ? > where i can check off items to > manipulate in the database, each checkbox containing the recordID to > manipulate > > if i check one box, (recordID # 66) then the length of that value is 2 > > If i check two boxes (record id # 66,67) then the length of the list > is 2 > What command should I be using to give me the number of elements in > the list. I'm currently using len(listnamehere) If it's a plain html form and you get your values thru request.POST (or GET), remember that the http protocol is text-based, and that len('66') == 2. django's HttpRequest object's GET and POST are QueryDict instances. You may want to use POST.getlist(yourcheckboxnamehere) instead of POST[yourcheckboxnamehere], and if you expect integers, do the conversion by yourself (hint : map(int, yourlist)) HTH --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---