[英]Bootstrap theme is not loading in django
I am trying to make a layout for a bookstore app... I have installed bootstrap through command line and I am trying to load simplex theme. 我正在尝试为书店应用程序布局...我已经通过命令行安装了引导程序,并且正在尝试加载单纯形主题。
I am getting this error 我收到此错误
TemplateSyntaxError at /store/
'bootstrap_styles' received some positional argument(s) after some keyword argument(s)
Also, when I delete that line of code and try to execute it I get error of {% endblock %} 另外,当我删除那行代码并尝试执行它时,我得到了{%endblock%}的错误
this.. 这个..
TemplateSyntaxError at /store/
Invalid block tag: 'endblock'
Here is my base.html 这是我的base.html
{% extends 'bootstrap3/bootstrap3.html' %}
{% load staticfiles %}
{% load bootstrap3 %}
{% load bootstrap_themes %}
{% bootstrap_styles theme='simplex' type ='min.css' %}
{% block bootstrap3_extra_head %}
<link href = "http://fonts.googleapis.com/css?family=Open+Sans:400,300,700" rel = "stylesheet" type="text/css"/>
<link href = "{% static 'base/css/style.css' %}" rel = "stylesheet" type="text/css"/>
{% endblock %}
{% block bootstrap3_title %}
{%block title %}
Welcome to Pick A Book !!
{%endblock %}
{% endblock %}
{ block bootstrap3_content %}
<nav class = "navbar navbar-inverse navbar-fixed-top">
<div class = "container">
<div class = "navbar-header">
<button type="button" class ="navbar-toggle" data-toggle="collapse" data-target = "#navbar">
<span class = "icon-bar"> </span>
<span class = "icon-bar"> </span>
<span class = "icon-bar"> </span>
</button>
<a href="{% url 'index' %}" class = "navbar-brand"> Pick A Book</a>
</div>
<div id = "navbar" class ="collapse navbar-collapse">
<ul class ="nav navbar-nav">
<li class = "hvr=curl-top-right"><a href = "{% url 'index' %}">Home</a> </li>
<li class = "hvr=curl-top-right"><a href = "#about"> About</a> </li>
<li class = "hvr=curl-top-right"><a href = "#contact">Contact</a> </li>
</ul>
<div class = "navbar-form pull-right">
{% if request.user.is_authenticated %}
Welcome {% if request.user.first_name %}
{{ request.user.first_name }}
{% else %}
{{ request.user.username }}
{% endif %}!<a href = "{% url 'auth_logout' %}"> Log Out </a>
{% else %}
Welcome,<a href = "{% url 'auth_login' %}"> Log In</a> or <a href="{% url 'registration_register' %}" > Register</a>
{% endif %}
</div>
</div>
</div>
</nav>
<div class = "container-fluid">
<img src = "{% static 'base/img/header_full.jpg' %}" class ="bg">
<div class = "parallax">
<div class ="row">
{ % block body %}
<div class = "col-md-8 col-md-offset-2 col-sm-12 maincontent">
Welcome to our Store.
</div>
{%endblock%}
</div>
</div>
</div>
<div class = "row text-center navbar footer">
<div class = "col-md-12">
<p> 2017 Pick A Book. Developed by <a href="http://kshitijrangai.com"> Kshitij Rangari </a> </p>
</div>
</div>
{%endblock%}
有一些语法错误
{% block bootstrap3_title %} {%block title %} #<<<<<<<<<<<<<<< {% block title %} Welcome to Pick A Book !! {%endblock %} #<<<<<<<<<<<<<<<< {% endblock %} {% endblock %} { block bootstrap3_content %} #<<<<<<<<<<<<<<<< missing % after {
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.