1

I created a python code to create CLI tools that visualize the database schema. But I have an issue. I have tried to read the models.py in the django project and get sql statement but I don't know how to do it.

I want to convert django model into sql query.

  • is this [getting-the-sql-from-a-django-queryset](https://stackoverflow.com/questions/3748295/getting-the-sql-from-a-django-queryset) you are looking for ? – sahasrara62 Feb 27 '23 at 06:45
  • I just want to get query for creating the table, not selecting an object from database. And what I want to do is to get sql query for creating the table from the django model. I know how to get query in django project but this python app uses models.py file. – Adrian Botteon Feb 27 '23 at 12:27

0 Answers0