refactor(reorg): extract user + system_settings modules [6/10]#14981
Closed
valentijnscholten wants to merge 2 commits into
Closed
refactor(reorg): extract user + system_settings modules [6/10]#14981valentijnscholten wants to merge 2 commits into
valentijnscholten wants to merge 2 commits into
Conversation
This was referenced Jun 8, 2026
Closed
25aaaed to
7cade3c
Compare
d95c5b8 to
4674618
Compare
…ettings/ [system_settings Phase 1,3,5,6,8,9]
4674618 to
fec3120
Compare
7cade3c to
c1dba14
Compare
Member
Author
|
We decided to go with the all-in-one PR10 from our list: #14987 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked PRs
This is one of a stacked series that reorganizes
dojo/into self-containeddojo/{module}/packages (matching thedojo/url/reference). They are stacked — each PR is based on the previous one — so review and merge bottom-up in this order:Merge #14970 first; each following branch is rebased onto the updated base and merged in turn. This PR continues the stack on top of #14974 — full implementation brief is the Phase 10 section in
AGENTS.md.Summary
Reorganizes the
userandsystem_settingsdomains into self-containeddojo/user/anddojo/system_settings/packages withui/andapi/sub-packages, matching thedojo/url/reference layout. Pure code-movement: no behaviour or migration changes; backward-compat re-exports keep external consumers working.user (
dojo/user/)Dojo_User,UserContactInfo,Contactintodojo/user/{models,admin}.py.Dojo_Useris an FK target across many remaining models, so it is re-exported fromdojo.modelswithout# noqa: F401(still referenced by remaining class bodies); the re-export sits at the earliest moved-class position so those FKs resolve.DojoUserForm,AddDojoUserForm,EditDojoUserForm,DeleteUserForm,UserContactInfoForm) intoui/forms.py,UserFilterintoui/filters.py, andApiUserFilterintoapi/filters.py. The filter re-exports indojo/filters.pyare dropped (they would cycle withDojoFilter); consumers repoint to the new paths.UserSerializer,UserContactInfoSerializer,UserStubSerializer,AddUserSerializer,UserProfileSerializer) intoapi/serializer.py, re-exported fromapi_v2/serializers.pyfor prefetcher discovery and the remainingUserStubSerializerconsumers. MoveUsersViewSet,UserContactInfoViewSet,UserProfileViewintoapi/views.pyand adddojo/user/api/urls.py(add_user_urls), preserving the exact routes/basenames.views.py/urls.pyintoui/, repointing thedojo/urls.pyincludes anddojo/metrics/views.py.system_settings (
dojo/system_settings/)System_Settingsintodojo/system_settings/{models,admin}.py(no FK fields; the class-bodySystem_Settings_Managerimport is preserved). Thedojo.modelsre-export is placed after theDojo_Userre-export because the manager pulls indojo.middleware, which importsDojo_User.SystemSettingsFormintoui/forms.py,SystemSettingsSerializerintoapi/serializer.py(re-exported for prefetcher discovery), andSystemSettingsViewSetintoapi/views.pywithadd_system_settings_urls, preserving thesystem_settingsroute/basename.views.py/urls.pyintoui/, repointing thedojo/urls.pyinclude.