rahulmishra.tech
  • Home
  • Databases
  • Django
  • Security
  • Basics
  • Author
Subscribe
Tagged

ContentType

A collection of 2 posts

How To Use GenericForeignKeys In Django
ContentType

How To Use GenericForeignKeys In Django

In the first part of the article, we learned about the contenttypes framework and the ContentType model. In this article, we will see how that is being used in the implementation of Generic Foreign Keys. Let's first understand when we can need a generic foreign key, consider a case, where

  • Rahul Mishra
Rahul Mishra Aug 21, 2021 • 4 min read
Understanding Django ContentType
ContentType

Understanding Django ContentType

In this series, we will understand Django's ContentType and what is GenericForeignKey with examples. contenttypes is a Django app that can track all of the models installed in our Django-powered project, providing a high-level, generic interface for working with our models. If we check in settings INSTALLED_APPS we can

  • Rahul Mishra
Rahul Mishra Aug 21, 2021 • 2 min read
rahulmishra.tech © 2025
Powered by Ghost