mysql table name changed after command, 'python manage.py inspectdb > mysite/myapp/models.py'
|Reported by:||macky123||Owned by:||nobody|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I'm new to Django and deploying my app using the mysql database engine. Using Webmin, I added a new table to my database, and then successfully added it to models.py using the command, python manage.py inspectdb > mysite/myapp/models.py. However, one of my tables, the 'Users' table I had previously created, was somehow to 'myapp_users'. As a result, I have to change all my views that refer to this table, e.g.to query, Users.objects.all() had to be changed to myapp.users.objects.all().
Change History (3)
comment:1 Changed 7 years ago by hcarvalhoalves
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to invalid
- Status changed from new to closed
comment:2 Changed 7 years ago by macky123
- Resolution invalid deleted
- Status changed from closed to reopened