在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