Opened 18 years ago
Closed 16 years ago
#3644 closed (wontfix)
[multi-db] duplicate model names within one app don't work
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | other branch |
Severity: | Keywords: | multi-db | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I'm using multi-db to do versioning, so I have a models_v1 and a models_v2 file with identical model names, and just import one or the other from my models file. If I try to use _both_ model versions at the same time, django won't let me because of the way the models are registered, by class name within an app. So I've modified that to include the module name (the key is now models_v1.classname or just plain models.classname), and this all works ok, as long as _all_ calls to get_model() supply 'models.'+name as the second argument. Patch is attached.
Hope this helps!
Ciao, Marc.
Attachments (2)
Change History (5)
by , 18 years ago
Attachment: | multi-db-modelnameconflict.diff added |
---|
comment:1 by , 18 years ago
Summary: | [multi-db][patch] duplicate model names within one app don't work → [multi-db] duplicate model names within one app don't work |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 17 years ago
I have a feeling that whatever comes out of #3591 will help with this, even though that's targeted more at app_label
.
comment:3 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Multi-db isn't maintained as a branch. Tickets against it aren't ever going to be fixed directly (although people keep talking about taking different approaches to solve the same problem).
patch resolves inability to use duplicate model names within an app