On Jun 30, 3:01 pm, Milan Andric <[EMAIL PROTECTED]> wrote:
> I've been wresting with this one for a couple hours now trying to
> track it down, but no luck. I'm recently updated to django trunk and
> getting very odd reponses. I could take the same page and refresh it
> several times in succession and eventually get the page, but usually
> get 500 errors. What would cause that?
>
> http://multimedia.journalism.berkeley.edu/training/projects/
>
> I also restarted/stop/started and removed all .pyc files from my
> project, installed apps and django just for good measure.
>
> I managed to get the traceback while in debug mode that raises a
> FieldError:http://dpaste.com/59999/
>
> Here's the wrapped generic view that is being called:http://dpaste.com/60002/
>
> Here's the model:http://dpaste.com/60005/
>
Does anyone have comments on the above model? I'm wresting with a
FieldError during a loop in the template and having a hell of a time
tracking down the problem.
The relevant part of the template is:
{% for m in p.members.all %}
<a href="{{m.get_profile.get_absolute_url}}"
>{{m.get_profile.get_display_name}}</a>{% if not forloop.last %},
{% endif %}
{% endfor %}
When I do the same loop in the shell I don't get any exceptions. Any
help is greatly appreciated, this is on trunk.
The code seems to choke on specifically one project (id 51) but I've
traced all the relations in the db that I could think of and don't see
any inconsistencies. But the template error is not consistent meaning
sometimes i get the exception and sometimes I don't so just trying to
clean things up where I can, starting with the model.
--
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
-~----------~----~----~----~------~----~------~--~---