Django Contactme TemplateSyntaxError

时间:2012-05-19 12:57:13

标签: django django-forms django-templates django-urls

我收到一个TemplateSyntaxError,它只发生在我的开发服务器上,但在本地的django测试服务器上工作正常。

这是我的所有代码:https://github.com/halitalptekin/HDBlog

此错误代码:

TemplateSyntaxError at /iletisim/
Could not parse the remainder: '-post-contact-form' from 'contactme-post-contact-form'

在模板/home/templates/hdbootstrap/django_contactme/form.html中,第41行出错

这是第41行

<form id="CF" action="{% url contactme-post-contact-form %}" method="post">{% csrf_token %}

1 个答案:

答案 0 :(得分:0)

正如Mark Lavin所问,你可能正在使用the latest version of url tag

  • 使用{% url "contactme-post-contact-form" %}
  • 如果测试服务器依次失败,则
  • {% load url from future %}{% url "contactme-post-contact-form" %}