0
我正在嘗試使用django的contenttypes庫,並且發現了一些奇怪的東西。爲什麼django ContentType標識符會更改?
以下行:對於依賴於當它被稱爲我的每個模型的
for content_type in ContentType.objects.all():
print "%s: %s" % (content_type.id, content_type.model)
印刷不同的ID。
當我運行測試套件,首先它打印此:
Creating test database for alias 'default'...
這似乎重新索引一切並打印此:
1: logentry
2: permission
3: group
4: user
5: contenttype
6: session
7: concepttag
8: difficultytag
9: questiontypetag
10: questionformattag
11: sharedassetconcepttag
12: curriculumtag
13: tagtagrule
14: objecttag
1: logentry
2: permission
3: group
4: user
5: contenttype
6: session
12: tagtagrule
15: concepttag
16: difficultytag
17: questiontypetag
18: questionformattag
19: sharedassetconcepttag
20: curriculumtag
21: objectposition
22: usermediaimage
23: objecttag
但隨後該消息後
這是怎麼回事?