Django-templates problem {% if object|Länge > 4 %} wirft TemplateDoesNotExist: 500.html

Habe ich Folgendes in mein template.

{% block content %}
    {% for album in albumsList %}
        {% if fotosList %}
            <div class="photoalbum-wrapper">
                <h3>{{ album.title }}</h3>
                <ul class="photoalbum">
                    {% for foto in fotosList %}<li>item</li>{% endfor %}
                </ul>
                {% if fotosList|length > 4 %}
                    <a href="#" class="trigger">больше <span>&#9660;</span></a>
                {% endif %}
            </div>
        {% endif %}  
    {% endfor %}
{% endblock %}

Und es stellt sich die TemplateDoesNotExist: 500.html.

Wenn ich das einfach schreiben {{ fotoList|length }} es funktioniert okay.

InformationsquelleAutor tataata | 2010-01-27

Schreibe einen Kommentar