Django error: Invalid block tag: expected 'endblock'

Asked

Viewed 146 times

0

In the development environment works normally, already in the production server I have the following error:

Invalid block tag: 'ultimos_produtos', expected 'endblock'

Follow the code excerpt:

{% extends "base.html" %}
{% load shop_tags i18n %}

{% block meta_title %}{% trans "Home" %}{% endblock %}
{% block title %}{% trans "Home" %}{% endblock %}

{% block breadcrumb_menu %}
<li class="active">{% trans "Home" %}</li>
{% endblock %}

{% block main %}

<h3> Em destaque </h3>
{% ultimos_produtos "perfumes" "span2" 3 %}

{% endblock %}

I’m using Django 1.8.16, Mezzanine 4.0.1.

The only difference between environments is that the production environment uses python 2.7.6 and the python 2.7.8 development

Does anyone know what might be going on?

  • Did you upload the templatetags folder? Restarted the server?

  • I have no experience with custom tags, but one thing I notice when it comes to templates in general is that it is necessary to use manage.py collecttemplates in production - while in the development environment this is not necessary. Shooting in the dark, but maybe it helps...

  • Please send the code of the file "base.html"

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.