Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to use django-bootstrap3 package with my project.

I have built my template like this:

{% extends "base.html" %}

{% block content %}

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">{% bootstrap_icon "star" %} All customers</h3>
    </div>
    <div class="panel-body">
        All your customers are listed here in alphabetical order. In this panel you can update and delete
        your customer informations.
    </div>
</div>
    {{ customers }}

{% endblock %}

But i'm getting

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

Error.

{% load bootstrap3 %}
{% bootstrap_css %}
{% bootstrap_javascript %}

Are in base.html file.

like image 717
Sefa Avatar asked Feb 18 '15 17:02

Sefa


1 Answers

You should load {% load bootstrap3 %} inside your template.

{% extends "base.html" %}
{% load bootstrap3 %}


{% block content %}

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">{% bootstrap_icon "star" %} All customers</h3>
    </div>
    <div class="panel-body">
        All your customers are listed here in alphabetical order. In this panel you can update and delete
        your customer informations.
    </div>
</div>
    {{ customers }}

{% endblock %}
like image 186
RéÑjïth Avatar answered Nov 04 '22 06:11

RéÑjïth