I'm very new to Python and Django so maybe someone can point me in the
right direction.
I have the following url.py line
url(r'^$', direct_to_template,
{'template':'index.html',
'extra_context':{'featured_actors': lambda:
User.objects
.annotate(avatars_nb=Count('avatar'))
.filter(actor_profile__is_featured=True,
avatars_nb__gt=0)
.order_by('?')[:4]},
}, name='index'),
All this was working perfectly fine for a long time but for no reason
that I can see all of a sudden I'm getting this template error.
TemplateSyntaxError at /
Caught an exception while rendering: (36, 'File name too long')
On line 70
66 {% if featured_actors|length %}
67 <div id="featured">
68 <h2>Featured Actors: </h2>
69 <ul>
70 {% for actor in featured_actors %}
71 <li>
72 <a href="{% url public_profile actor.username %}">
73 <img src="{% avatar_itself_url
actor.avatar_set.all.0 200 %}" alt="{{ actor.profile.firstname }}
{{ actor.profile.lastname }}" style="max-width:140px" height="200"/>
74 </a>
75 </li>
76 {% endfor %}
What is the best way to debug this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.