[Django]-Django : content_type_id in GenericForeignKey

3๐Ÿ‘

โœ…

  • In your database maybe have table is django_content_type. And content_type, content_type_id, content_object reference in this table. Its use for define anything like โ€œtypeโ€ of your data.

  • Like a wheel, it maybe wheel of car or bicycle. In this case car and bicycle is a content_object. And id of car and bicycle in table django_content_type is content_type_id

๐Ÿ‘คNgoc Pham

Leave a comment