Skip to content

refactor(reorg): extract regulations/banner/announcement/development_environment/object [10/10]#14987

Draft
valentijnscholten wants to merge 2 commits into
reorg/peripheral-notes-filesfrom
reorg/peripheral-misc
Draft

refactor(reorg): extract regulations/banner/announcement/development_environment/object [10/10]#14987
valentijnscholten wants to merge 2 commits into
reorg/peripheral-notes-filesfrom
reorg/peripheral-misc

Conversation

@valentijnscholten

@valentijnscholten valentijnscholten commented Jun 9, 2026

Copy link
Copy Markdown
Member

Stacked PRs

This is one of a stacked series that reorganizes dojo/ into self-contained dojo/{module}/ packages (matching the dojo/url/ reference). They are stacked — each PR is based on the previous one — so review and merge bottom-up in this order:

  1. refactor(product_type): Extra ProductType models into dojo/product_type/ module [1/10] #14970 — product_type
  2. refactor(test): Extract Test models into dojo/test/ module [2/10] #14971 — test
  3. refactor(engagement): Extract Test models into dojo/test/ module [3/10] #14972 — engagement
  4. refactor(product): Extract Product module into dojo/product/ [4/10] #14973 — product
  5. refactor(finding): Reorganize finding into self-contained dojo/finding/ package [5/10] #14974 — finding (+ CWE & BurpRawRequestResponse fold-in)
  6. refactor(reorg): extract user + system_settings modules [6/10] #14981 — peripheral: user + system_settings
  7. refactor(reorg): extract endpoint + tool_type/tool_config/tool_product modules [7/10] #14982 — peripheral: endpoint + tool_type/tool_config/tool_product
  8. refactor(reorg): extract survey + benchmark modules [8/10] #14983 — peripheral: survey + benchmark
  9. refactor(reorg): extract notes/note_type/file_uploads/reports/risk_acceptance [9/10] #14986 — peripheral: notes/note_type + file_uploads + reports + risk_acceptance
  10. refactor(reorg): extract regulations/banner/announcement/development_environment/object [10/10] #14987 — peripheral: regulations + banner + announcement + development_environment + object ◀ this PR

Merge #14970 first; each following branch is rebased onto the updated base and merged in turn. This PR is the top of the stack (on top of #14986) — full implementation brief is the Phase 10 section in AGENTS.md.

Summary

Reorganizes the regulations, banner, announcement, development_environment, and object domains into self-contained dojo/{module}/ packages with ui/ (and, where an API exists, api/) sub-packages, matching the dojo/url/ reference layout. Pure code-movement: no behaviour or migration changes; backward-compat re-exports keep external consumers working.

regulations / development_environment / announcement (have API layers)

  • Move Regulation, Development_Environment, Announcement, UserAnnouncement into their {models,admin}.py (string-ref FKs). The ANNOUNCEMENT_STYLE_CHOICES constant moves into dojo/announcement/models.py (re-exported from dojo.models).
  • Move RegulationSerializer/DevelopmentEnvironmentSerializer/AnnouncementSerializer into each module's api/serializer.py (re-exported from api_v2/serializers.py for prefetcher discovery), and RegulationsViewSet/DevelopmentEnvironmentViewSet/AnnouncementViewSet into api/views.py with add_*_urls, preserving routes/basenames.
  • Move the forms into each module's ui/forms.py and views.py/urls.py into ui/; announcement/os_message.py and signals.py stay.

banner / object (no API layer)

  • Move BannerConf and Objects_Review/Objects_Product into their {models,admin}.py (string-ref FKs; the tagulous.admin.register(Objects_Product.tags) registration moves to dojo/object/admin.py). Move LoginBanner and the object settings forms into each module's ui/forms.py, and views.py/urls.py into ui/.

@valentijnscholten valentijnscholten changed the title refactor(reorg): extract regulations/banner/announcement/development_environment/object [Phase 10 PR 10/10] refactor(reorg): extract regulations/banner/announcement/development_environment/object [10/10] Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant