Closed bswbatman closed 4 years ago
麻烦把 _sidebar.html 模板内容贴上来看看?
另外,你用的 Bootstrap 扩展是哪一个,Flask-Boostrap 还是 Bootstrap-Flask?
另外,你用的 Bootstrap 扩展是哪一个,Flask-Boostrap 还是 Bootstrap-Flask? 使用的Flask-Boostrap
alembic==1.3.1 beautifulsoup4==4.7.1 blinker==1.4 certifi==2019.3.9 chardet==3.0.4 Click==7.0 dominate==2.4.0 Flask==1.1.1 Flask-Bootstrap==3.3.7.1 Flask-CKEditor==0.4.3 Flask-DebugToolbar==0.10.1 Flask-Dropzone==1.5.4 Flask-Login==0.4.1 Flask-Mail==0.9.1 Flask-Migrate==2.5.2 Flask-Moment==0.9.0 Flask-SQLAlchemy==2.4.1 Flask-WTF==0.14.2 idna==2.8 itsdangerous==1.1.0 Jinja2==2.10.3 Mako==1.1.0 MarkupSafe==1.1.1 python-dateutil==2.8.1 python-dotenv==0.10.3 python-editor==1.0.4 python-http-client==3.2.1 requests==2.22.0 sendgrid==6.1.0 sendgrid-python==0.1.1 six==1.13.0 soupsieve==1.9.1 SQLAlchemy==1.3.11 Unidecode==1.1.1 urllib3==1.25.3 visitor==0.1.3 Werkzeug==0.16.0 WTForms==2.2.1
麻烦把 _sidebar.html 模板内容贴上来看看?
_sidebar.html :
**{% if links %}
{% endif %}
{% if categories %}
{% endif %}
猜测是包的安装问题,卸载掉 Flask-Boostrap 重新安装试试。
好的谢谢 已解决
感谢大佬回复:) 部署到Linux时候,gunicorn -b 0.0.0.0:8000 wsgi:app (env-37) [root@VM_0_6_centos bluelog]# gunicorn -b 0.0.0.0:8000 wsgi:app [2019-12-12 19:44:37 +0800] [8202] [INFO] Starting gunicorn 20.0.4 [2019-12-12 19:44:37 +0800] [8202] [INFO] Listening at: http://0.0.0.0:8000 (8202) [2019-12-12 19:44:37 +0800] [8202] [INFO] Using worker: sync [2019-12-12 19:44:37 +0800] [8240] [INFO] Booting worker with pid: 8240
然后顺着ip访问就出现下面的错误 我感觉关键的错误是 jinja2.exceptions.TemplateNotFound: bootstrap/nav.html 这个日志出现很多次