Django:错误:未正确配置模块没有定义“ "类 [英] Django: Error: ImproperlyConfigured Module does not define a " " class
本文介绍了Django:错误:未正确配置模块没有定义“ "类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
不正确配置:中间件模块报告没有定义ReportMiddleware类
ImproperlyConfigured: Middleware module "report" does not define a "ReportMiddleware" class
但是我已经定义了这个,但是可能在错误的地方定义,所以我应该在哪里放置这个类文件?
But I had defined this, but probably defined in wrong place, so where should I place this class file?
推荐答案
你应该把它放在包中的模块中,如 MIDDLEWARE_CLASSES
设置。
You should put it within the module in the package as specified in the MIDDLEWARE_CLASSES
setting.
这篇关于Django:错误:未正确配置模块没有定义“ "类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文