- Name: Bhuvnesh Sharma
- Organization: Django Software foundation
- Mentors: Mariusz Felisiak and Natalia Bidart
- Project: Moving models between apps.
- Proposal: GSoC 2023 Moving models between apps proposal
- Ticket: #24686
- Forum: here.
- Discussion: PR
- Make auto-detector generate migrations that allow moving a model between apps.
- Write auto-detector tests to check if the operations generated to move a model are correct.
- Write operations test to check if the set of operations generated by auto-detector actually moves a model correctly or not.
- Add release note and document the new feature.
-
- Created a new method in auto-detector which detects the moved model and automatically generates the migrations required to move that model to other model.
- Wrote tests to check if the generated set of migrations by the auto-detector are correct.
- Wrote test to check if the auto-generated migration operations actually move a model without any errors.
- Created a demo-project to demonstrate and thoroughly test the working of the newly implemented feature.
- Added a release note and short note on how moving a model between apps is handled by django.
-
While Testing the newly added feature, we came across a bug which made
AlterField
operation remake a table while renaming a related model with db_table. But since only the model name is changed and not table name(db_table),AlterField
should be a noop. This was fixed in #17085. -
- The new method
generate_moved_model()
to auto-detect moved model. - Tests
- Documentation All in #16905
- The new method
I would like to thank my mentor Mariusz Felisiak and Natalia Bidart for helping and guiding me whenever I got stuck. All the reviews were helpful and I learned a lot about the django internals from them.
Hlo sir i also want to participate in django community for learning and future growth give the overview how to start