On Jul 1, 5:03 am, "Scott Moonen" <[EMAIL PROTECTED]> wrote:
> Milan, I took another look at the error and your template. Judging from the
> error (it seems to be complaining about some access to the member object,
> rather than the project list), I think the reference to line 9 is a red
> herring. In other words, the outermost tag that Django is rendering at the
> time is your outer for loop, but the real problem is occurring in the
> rendering of an inner loop.
>
> So I'd ignore the reference to line 9 and look further at the inner contents
> of that for loop. I don't think the entire for loop is included in the
> dpaste traceback snippet, as I don't see its endfor.
>
The problem is with the {% for m in p.members.all %} line, where the
manytomanyfield members gets resolved. When I comment out that for
loop things are fine. I have no problem doing this in the django
shell:
>>> for p in Project.objects.all():
>>> p.members.all()
But it causes a FieldError in the template only on production (apache/
mod_python) which is running MySQL4 while my dev has MySQL5. I will
try a recent copy of the db to see if it's something in the db. Also,
I made a UserProfile model change since I upgraded to queryset-
refactor/trunk which consisted of doing OneToOneField(User,
primary_key=True) ...
--
Milan
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---