Reputation: 93
I'm refactoring some code and I wish to move a custom StreamBlock (or StructBlock) from one django app to another.
This seems like it would be much simpler than migrating tables between apps.
Is this really all we need to do? Are there any deployment risks, here - or is this really a pure python change.
Upvotes: 2
Views: 122
Reputation: 25227
Assuming the block declaration itself doesn't change, and all StreamFields referencing it are updated to point to it in its new location - yes, it's a pure Python change. You don't even need to update migrations, because migrations are set up to include their own frozen copy of StreamBlock
/ StructBlock
definitions as they existed at the time of creation, rather than pointing to the definition within your app code.
Upvotes: 3