refactor(product): Extract Product module into dojo/product/ [4/10]#14973
Draft
valentijnscholten wants to merge 4 commits into
Draft
refactor(product): Extract Product module into dojo/product/ [4/10]#14973valentijnscholten wants to merge 4 commits into
valentijnscholten wants to merge 4 commits into
Conversation
d85da61 to
bb94914
Compare
619aa3c to
7814217
Compare
bb94914 to
9b496b8
Compare
This was referenced Jun 7, 2026
7814217 to
6f8ddfa
Compare
8211ac8 to
6e960b9
Compare
af767e0 to
517f275
Compare
6e960b9 to
fab1ca1
Compare
517f275 to
aaefda7
Compare
6b36b59 to
e5724b1
Compare
…iguration into dojo/product/
Phase 1 of module reorg per AGENTS.md. Move Product, Product_Line,
Product_API_Scan_Configuration + admin registrations into dojo/product/{models,admin}.py.
Cross-module FKs use string refs to avoid circular imports. Product_Type re-export
now pure backward-compat (F401). No migration change.
aaefda7 to
bc82e74
Compare
e5724b1 to
2d773ad
Compare
This was referenced Jun 8, 2026
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. PRs 6–10 (draft, head branches on the DefectDojo upstream repo) continue the stack on top of #14974 — full implementation brief is the Phase 10 section in
AGENTS.md.Summary
Reorganizes the Product domain into a self-contained
dojo/product/package (models +ui/+api/), matching thedojo/url/reference and the completeddojo/test/anddojo/engagement/modules.Models
Product,Product_Line,Product_API_Scan_Configuration+ admin intodojo/product/{models,admin}.py.Product_Member/Product_Groupstay indojo/authorization/.Productmethods queryingFinding/Engagementuse lazy imports. Identical migrations.Forms + UI filters →
dojo/product/ui/ProductForm,DeleteProductForm,Add_Product_AuthorizedUsersForm,Authorize_User_For_ProductsForm,ProductCountsFormBase,ProductTagCountsForm,Product_API_Scan_ConfigurationForm,DeleteProduct_API_Scan_ConfigurationForm) intoui/forms.py.ProductComponentFilter,ComponentFilter(+WithoutObjectLookups),ProductFilterHelper,ProductFilter(+WithoutObjectLookups)) intoui/filters.py.ProductSLAFilterstays indojo/filters.pyas a shared base (also used by the asset API andApiProductFilter).dojo/forms.pykeeps re-exports only for symbols still consumed outside the module (ProductCountsFormBase,ProductTagCountsForm,Authorize_User_For_ProductsForm); filter consumers (dojo/components/,dojo/product_type/) are repointed to the new path to avoid adojo.filtersimport cycle.Views →
dojo/product/ui/views.pydojo/product/views.pyintoui/views.py; updatedojo/asset/urls.pyanddojo/organization/urls.pyimports.services.py: product views are CRUD + metrics-display queries with no extractable workflow (matches theproduct_typereference).API layer →
dojo/product/api/ProductSerializer,ProductAPIScanConfigurationSerializer,ProductMetaSerializerintoapi/serializer.py(tagsvia a lazyget_fields()to avoid theapi_v2.serializerscycle),ApiProductFilterintoapi/filters.py, andProductViewSet+ProductAPIScanConfigurationViewSetintoapi/views.py.api/urls.pyregisters both viewsets;dojo/urls.pycallsadd_product_urls(v2_api). Routes and basenames (products/product,product_api_scan_configurations/product_api_scan_configuration) are unchanged.api_v2/serializers.pykeeps re-exports forProductSerializer(used byReportGenerateSerializer) andProductMetaSerializer(used by the asset API); the viewset is not re-exported (would cycle), sodojo/urls.pyandunittests/test_rest_framework.pyare repointed.Backward-compat re-exports keep existing consumers unchanged. No migration change.