基于功能的通用视图已被弃用 [英] Function-based generic views have been deprecated
问题描述
DeprecationWarning:基于功能的通用视图已被弃用;使用基于类的视图。
当我运行我的网站时,我不断收到此警告。这是什么意思,我该如何解决?
Django 1.3介绍基于类别的视图,并添加了一系列通用的基于类的视图。 Django还提供有关将基于功能的视图迁移到基于类的视图的文档。 / p>
目前还没有什么可说的:您的项目目前使用基于功能的视图,而基于类的视图是创建视图的新方式。
DeprecationWarning: Function-based generic views have been deprecated; use class-based views instead.
I keep getting this warning, when I'm running my site. What does this mean and how can I fix it?
Django 1.3 introduced class-based views and also added a range of generic class-based views. Django also has documentation about migrating function-based views to class-based views.
There is not really much more to say about it: your project currently uses function-based views whereas class-based views are the new way of creating views.
这篇关于基于功能的通用视图已被弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!