#23981 closed Bug (worksforme)
Error accessing the table from an app with label changed
Reported by: | psnma | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Normal | Keywords: | appconfig, label, model |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I created an app and using AppConfig I changed the label to another name ('abc' to 'my_abc'). The migration was successful and the table was created with the label prefix (table 'my_abc'). But when I access the page, Django emits an error that is trying to access the table without taking into account that has changed the name of the label, it is trying to access the table "abc", but should access "my_abc".
ProgrammingError relation "abc" does not exist
Note:
See TracTickets
for help on using tickets.
I can't reproduce this. I created an
AppConfig
for the poll app in the tutorial and change its label. When I setlabel = 'foo'
, I getno such table: foo_poll
when trying to access the admin change view.