问题:django.template.exceptions.TemplateSyntaxError: 'staticfiles' is not a registered tag library. Must be one of: admin_list admin_modify admin_urls cache i18n l10n log rest_framework static tz
django使用swagger自动生成API文档时,报错

解决方法
在settings.py里面配置一下以下代码

'libraries': {
    'staticfiles': 'django.templatetags.static',
}

 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号