[snip]

> > Sure -- seek_id is calculated in the view.  It is delivered to the
> > template
> > via the second argument to render_to_response: { ..., "seek_id" :
> > value,...}.
>
> Yes, I realised it came from the view like that. So my question wasn't
> clear. What have you said doesn't tell us what the seek_id value really
> *is*. Is it an integer, a string, an instance with methods? Can you
> print what type(seek_id) is before giving it to render_to_response just
> to check it really is what you are expecting.
>
> > Again, it's definitely not a list at that point, though it appears as
> > [value]
> > in the dump that occurs with an exception.
>
> Something strange is going on and that is why I am asking about seek_id.
> Django does not just convert things to lists if they aren't lists, so
> either you are passing in something like a QuerySet, whose string
> representation makes it looks like a list (are you using filter()
> instead of get() in a QuerySet for example?), or seek_id is not what you
> think it is. So put some debugging prints in the view and try to gather
> some more information about seek_id.
>
> Regards,
> Malcolm

Arggh!  I lied! (answered without looking at the actual code).  seek_id
is getting
passed in with new_data in the form.  The real code is:

   ...
   new_data["seek_id"]= value
   ...
 form= forms.FormWrapper(manipulator, new_data, errors)
 render_to_response(pagename, { "form" : form, ... })

My profuse apologies, Malcolm.  I will have to modify my code to see if
the same thing
happens if it gets passed in directly (i.e. without the FormWrapper).
A quick glance
at class FormWrapper suggests that this may well be where the
"listification" is happening,
so bypassing it should solve the problem.

Thanks again, Malcolm!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to