python - pinax-theme-bootstrap 无法加载 bootstrap

标签 python django twitter-bootstrap pinax

我目前正在使用(或至少尝试使用)django-user-accout 和 pinax-theme-bootstrap。但是,当我尝试使用任何提供的模板时,我得到了预期的结果 TemplateSyntaxError:“bootstrap”不是已注册的标签库。 此错误由以下行{% load bootstrap %} 引发。

我意识到发生这种情况是因为我没有提供依赖项(bootstrap、JQuery、Font Awesome)。我将如何提供它们?

附注我能找到的最接近的重复项如下:'bootstrap_tags' is not a valid tag library

编辑:我确实将 bootstrap 添加到了已安装应用程序列表中。我什至下载了一份 bootstrap 的副本,并添加了一个 init.py 来欺骗 python 认为它是一个模块(遇险调用)。一切都无济于事。

最佳答案

在 settings.py 中的 INSTALLED_APPS 中应该类似于:

 INSTALLED_APPS = [

    'bootstrap3',
    'bootstrap',
    'bootstrap_toolkit',
     ....
 ]

关于python - pinax-theme-bootstrap 无法加载 bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37932381/

相关文章:

python - brew 在哪里安装 Python 头文件?

来自 Django 的 Java Web 框架

javascript - 如何让 Highchart 填满整个 bootstrap 窗口?

javascript - 使用 django 和 ajax 重新加载页面而不刷新

css - 切换到移动设备时尝试自定义我的 Bootstrap 导航栏

css - 在哪里可以找到 Bootstrap 2.3 CDN?

python - 在 Python 2.7 中向字符串添加单引号

Python super : calling a base class method which contains another base class method that is overriden by derived class

python - 使用pygsheets使用service_file授权方法创建一个全新的sheet

python - 无法将 Django 查询集转换为列表