웹 세상/django
[에러 해결] TemplateSyntaxError 'bootstarap4' is not registered tag library.
여러가지이야기
2020. 4. 26. 21:32
TemplateSyntaxError at /community/
'bootstrap4' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_static
...
문제 상황
python manage.py runserver
-
런서버를 했는데 비쥬얼스튜디오 터미널 창에 ``ModuleNotFoundError: No module named 'bootstrap4' `이라고 떴다.
-
그리고 url도 뜨지 않는다.
해결 과정
- 구글링하면서 필요한 코드들을 입력해봤다.
python -m pip install bootstrap4
- bootstrap4를 설치하고 런서버를 하니까 이제 서버는 뜨는데 community/로 들어가면 templatesyntaxerror가 뜬다.
- 터미널 창을 보니
KeyError: 'bootstrap4'
라는 글자도 보인다.
pip install django_forms_bootstrap
- 이것도 깔아보라는 말이 있어서.. 깔아봤는데 여전히 해결이 안된다.
- 혹시 앱추가가 안되어 있나 해서 settins.py에 INSTALLED_APPS를 봤는데 bootstrap4 앱 추가를 잘해놨었다.
- 아래 코드를 입력했더니 해결!!! 얼마 후 같은 오류를 만나서 아래 코드를 바로 입력했더니 깔끔하게 해결되었다.
pip3 install django-bootstrap4