Created
January 2, 2021 13:17
-
-
Save SurendraTamang/94ad929b9141d2bd789a8eecf590b060 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Most of the time we need query the Model we dynamically we can do it by using | |
from django.apps import apps | |
# Suppose we have the Class Model of Keyword in the app as app | |
# app_name and model_name will be two parameters that is needed to be passed! | |
instance_keyword = apps.get_model('app','keyword') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment