拆分代码后遇到这个问题

django.template.exceptions.TemplateSyntaxError: 'stark' is not a registered tag library. Must be one of:
admin_list
admin_modify
admin_urls
cache
i18n
l10n
log
static
tz
 

1.在templatetags下加__init__.py模块【里面啥也不用写】

2.在settings.py中的INSTALLED_APPS中注册

'stark.templatetags',

如图

CRM之问题三【templatetags配置】

相关文章:

  • 2021-09-16
  • 2021-12-07
  • 2021-06-24
  • 2021-07-31
  • 2021-09-21
  • 2021-12-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2021-08-04
  • 2021-10-26
  • 2021-10-06
相关资源
相似解决方案