TemplateSyntaxError: 'settings_tags' is not a valid tag library

淺唱寂寞╮ 提交于 2019-12-04 04:56:47

It seems to me you probably have a code like {% load settings_tags %} somewhere in your template. Django looks for templatetags/settings_tags.py file in your installed apps' directories. This is the result of not finding a file like this. Maybe the app, which contains it is not in your INSTALLED_APPS or maybe it's a typo. You should be getting the same error when you put this url in your browser.

Sometimes this happens when you forgot to put an __ init __.py in the package.

Like @AJJ said, you may have to restart the server to get the new tags loaded

This is a common issue for this package. When you get it from pypi, it does not contains the template tag: settings_tag.py and that will cause the error 'settings_tags' is not a valid tag library: Template library settings_tags not found.

The current solution is to install it from the github zip.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!