54👍
✅
Yes it is possible, using the inspectdb command:
python manage.py inspectdb
or
python manage.py inspectdb > models.py
to get them in into the file
This will look at the database configured in your settings.py
and outputs model classes to standard output.
As Ignacio pointed out, there is a guide for your situation in the documentation.
👤TM.
2👍
If each table has an autoincrement integer PK then you can use the legacy database instructions.
- [Django]-How to set the default of a JSONField to empty list in Django and django-jsonfield?
- [Django]-I continuously receive `Invalid HTTP_HOST header` error email after I upgrade my django site from http to https
- [Django]-Django test FileField using test fixtures
Source:stackexchange.com