I Have a django model and i want to populate it with a raw sql query without the need of an sql view.
Is there a way to do such a thing ?
Thanks a lot
I Have a django model and i want to populate it with a raw sql query without the need of an sql view.
Is there a way to do such a thing ?
Thanks a lot
Can you provide more details about what it is you’re trying to do here? What is your objective?
By “populate”, do you mean copying data from one model (or table) to another?
A model is a representation of a table or a view - whether or not it’s managed doesn’t affect how it’s used.
My objective is to filter the raw sql query through django ORM but without to use an sql view
Is this: Performing raw SQL queries | Django documentation | Django what you’re looking for? If not, then I’m still not understanding what you’re trying to do here.
Perhaps a small example of what you’re envisioning may help.
Well i didn’t know that feature , thanks a lot , i will give it a try