I see.. if there were more than one item in there, the last comma
isn't necessary anymore, correct?

('more', { 'classes': 'collapse', 'fields' : ('entry_date',
'entry_something') }),


On Mar 30, 2:50 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 3/30/07, drackett <[EMAIL PROTECTED]> wrote:
>
> >                         ('more', { 'classes': 'collapse', 'fields' : 
> > ('entry_date') }),
>
> This line is the culprit; change it to
>
> ('more', { 'classes': 'collapse', 'fields' : ('entry_date',) }),
>
> Take note of the comma after 'entry_date'.
>
> The error happens because Django is trying to iterate over what it
> finds in that "fields" entry, and Python allows you to iterate over a
> string just as easily as a tuple, and without the comma it becomes a
> string. And so when Django goes to iterate over it, Python hands back
> the characters in the string, and Django ends up looking for fields
> named "e", "n", "t", "r", "y", etc.
>
> --
> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."


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

Reply via email to