[multi-db] duplicate model names within one app don't work
|Reported by:||Owned by:||nobody|
|Component:||Core (Other)||Version:||other branch|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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!
Change History (5)
comment:1 Changed 10 years ago by
|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|