我不明白这个Django模板错误消息

Ken*_*ows 0 django django-templates

这是填充我的页面的错误消息,附带代码问题:

/ home中的TemplateSyntaxError

无效的块标记:'endblock',预期'endif'

请求方法:GET

请求URL: http:// localhost:8000/home

Django版本:1.3.1

异常类型:TemplateSyntaxError

例外值:无效的块标记:'endblock',预期'endif'

码:

{% extends "profile/base_with_classes.html" %}

{% block username %}
    {% if user == None %}
        Nobody
        {% else %}
            {% if user.is_authenticated %}
            {{ user.username }}
        {% else %}
            Unauthenticated User
        {% endif %}
    (% endif %}
{% endblock username %}    <==== Issue is here
Run Code Online (Sandbox Code Playgroud)

我不明白.这是模板的顶部.

rob*_*rob 6

在最后的结尾,你有(而不是{