>>> from django.apps import apps
>>> apps.all_models['app_name']

So if your app is called, for example, products, then:

>>> apps.all_models['products']

Will create a dictionary with all the model classes from that app.

On Thursday, 14 May 2020 14:03:40 UTC+2, muazzem_ hossain wrote:
>
> how to get django all app model.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2406a55d-8d5a-406d-ba61-aee086a11352%40googlegroups.com.

Reply via email to