"django.db.models.query.QuerySet" vs "django.db.models.QuerySet"

瀏覽次數:35 次
跳到第一則未讀訊息

Ilya Kazakevich

未讀,
2015年9月29日 下午2:00:002015/9/29
收件者:Django users
In Django 1.6 it QuerySet was in package "django.db.models.query.QuerySet". But since 1.7 it also may be imported with "django.db.models.QuerySet".

Is "django.db.models.query.QuerySet" deprecated since 1.7? What is the "official" way to import QuerySet? I can't find any documentation regard this subject.

Tim Graham

未讀,
2015年9月29日 晚上8:52:322015/9/29
收件者:Django users
Either way is okay; the original location isn't deprecated. I'd use the "convenience" import in django.db.models if it were me.
回覆所有人
回覆作者
轉寄
0 則新訊息