gpt4 book ai didi

python - Django 中的 django.views.generic.list.ListView 和 django.views.generic.ListView 有什么区别?

转载 作者:行者123 更新时间:2023-12-01 03:00:20 25 4
gpt4 key购买 nike

the fourth part of the Django tutorial ,它使用了 django.views.generic.ListView,但在 Class-based views API reference 中,ListView 位于 django.views.generic.list.ListView 中。 django.views.generic.list.ListView 和 django.views.generic.ListView 之间有什么区别?

最佳答案

两者都完全引用同一个类。您可以通过以下方式检查

import inspect
from django.views.generic import ListView
print(inspect.getfile(ListView))
from django.views.generic.list import ListView
print(inspect.getfile(ListView))

关于python - Django 中的 django.views.generic.list.ListView 和 django.views.generic.ListView 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43910297/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com