python文件名目录名或卷标语法_在django中使用bootstrap4报错:OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: ‘「frozen importli...

在Django中尝试集成bootstrap4时遇到OSError: [WinError 123] 错误,通过重新安装django-bootstrap4及执行`python manage.py migrate`和`python manage.py runserver`解决了问题。此外,还记录了遇到的TemplateSyntaxError和Unclosed tag错误的解决方法,以及TypeError关于缺少请求参数的问题和cryptography模块缺失导致的运行时错误。
摘要由CSDN通过智能技术生成

在django中使用bootstrap4报错

在aototest/settings.py 中加入如下内容:

INSTALL_APPS = (

#...

'bootstrap4',

#...

在product_manage.html中:

# {# Load the tag library #}

{% load bootstrap4 %}

# {# Load CSS and JavaScript #}

{% bootstrap_css %}

{% bootstrap_javascript jquery='full' %}

随后访问 http://127.0.0.1:8000/product_manage/

链接失败。

查看development server已自动退出,重启server:

C:\Users\Jhin\AppData\Local\Programs\Python\Python37\Scripts\autotest>python manage.py runserver

Watching for file changes with StatReloader

Exception in thread django-main-thread:

Traceback (most recent call last):

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\threading.py", line 926, in _bootstrap_inner

self.run()

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\threading.py", line 870, in run

self._target(*self._args, **self._kwargs)

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\site-packages\django-3.0.8-py3.7.egg\django\utils\autoreload.py", line 53, in wrapper

fn(*args, **kwargs)

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\site-packages\django-3.0.8-py3.7.egg\django\core\management\commands\runserver.py", line 109, in inner_run

autoreload.raise_last_exception()

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\site-packages\django-3.0.8-py3.7.egg\django\utils\autoreload.py", line 76, in raise_last_exception

raise _exception[1]

File "C:\Users\Jhin\AppData\Local\Programs\Python\Python37\lib\site-packages\django-3.0.8-py3.7.egg\django\core\management\__init__.py", line 357, in execute

autoreload.check_errors(django.setup)()

File "C:\Users\Jhi

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值