2015-02-18 7 views
6

मैं अपने प्रोजेक्ट के साथ django-bootstrap3 पैकेज का उपयोग करने का प्रयास कर रहा हूं।अमान्य ब्लॉक टैग: 'bootstrap_icon', अपेक्षित 'एंडब्लॉक'

मैं इस तरह मेरे टेम्पलेट का निर्माण किया है:

{% 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 %} 

लेकिन मैं

अमान्य ब्लॉक टैग हो रही है: 'bootstrap_icon', उम्मीद 'endblock'

में त्रुटि।

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

base.html फ़ाइल में हैं।

उत्तर

13

आपको अपने टेम्पलेट के अंदर {% load bootstrap3 %} लोड करना चाहिए।

{% 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 %} 
संबंधित मुद्दे