Opened 10 years ago
Last modified 10 years ago
#24052 closed Cleanup/optimization
Document how to use models from other apps in RunPython — at Version 2
Reported by: | Aymeric Augustin | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
A common use case for RunPython (known in South as data migrations) is to port data from one model to another. When you do this across apps, you must add the other app to dependencies
. Otherwise you get a moderately helpful:
LookupError: No installed app with label 'people'.
Do you think it's worth documenting?
Change History (2)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Description: | modified (diff) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Definitely. I thought this came up before, but I can't find a ticket or any docs.
Note:
See TracTickets
for help on using tickets.
Here's an interesting variant of this problem.
If you attempt to use a relation that's defined in another app, the relation doesn't exist unless you include that app in your dependencies.