New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mixin classes renaming and filter code reorganization #2798
Conversation
🥲 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hardwork, LGTM!
I think we should hold off on this one until after we cut 1.5.1 - would like to get this as well as the apps-API first pass for #2723 into the same release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice step forward. I'm wondering if we should be more explicit about API serializer mixins and having those also be delineated in their own foo.api.serializers.mixins
submodule, or if we think their use-case is slightly different?
It may be less of a concern seeing as serializers aren't required for models/forms at this time?
24661ae
to
5e43dc3
Compare
Per our discussion this morning, I've added a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -110,3 +110,9 @@ def get_field_names(self, declared_fields, info): | |||
self.extend_field_names(fields, "custom_fields") | |||
self.extend_field_names(fields, "computed_fields", opt_in_only=True) | |||
return fields | |||
|
|||
|
|||
# TODO: remove in 2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should go ahead and backlog these and attach the issue(s) to the 2.2 milestone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Opened #2850.
Co-authored-by: Jathan McCollum <jathan@gmail.com>
Closes: #2779
What's Changed
Groundwork for #2723 and 2.0.
nautobot.dcim.filter_mixins
becomesnautobot.dcim.filters.mixins
submodulenautobot.extras.filters.mixins
andnautobot.extras.filters.customfields
submodulesnautobot.tenancy.filters.mixins
submodulenautobot.dcim.filters.CableTerminationFilterSet
nautobot.dcim.filters.mixins.CableTerminationModelFilterSetMixin
nautobot.dcim.api.serializers.CableTerminationSerializer
nautobot.dcim.api.serializers.CableTerminationModelSerializerMixin
nautobot.dcim.api.serializers.ConnectedEndpointSerializer
nautobot.dcim.api.serializers.PathEndpointModelSerializerMixin
nautobot.dcim.filters.ConnectionFilterSet
nautobot.dcim.filters.mixins.ConnectionFilterSetMixin
nautobot.extras.filters.CreatedUpdatedFilterSet
nautobot.extras.filters.mixins.CreatedUpdatedModelFilterSetMixin
nautobot.extras.filters.CustomFieldModelFilterSet
nautobot.extras.filters.mixins.CustomFieldModelFilterSetMixin
nautobot.extras.api.customfields.CustomFieldModelSerializer
nautobot.extras.api.customfields.CustomFieldModelSerializerMixin
nautobot.dcim.filters.DeviceComponentFilterSet
nautobot.dcim.filters.mixins.DeviceComponentModelFilterSetMixin
nautobot.dcim.filters.DeviceTypeComponentFilterSet
nautobot.dcim.filters.mixins.DeviceComponentTemplateModelFilterSetMixin
nautobot.extras.filters.LocalContextFilterSet
nautobot.extras.filters.mixins.LocalContextModelFilterSetMixin
nautobot.dcim.filters.PathEndpointFilterSet
nautobot.dcim.filters.mixins.PathEndpointModelFilterSetMixin
nautobot.extras.filters.RelationshipModelFilterSet
nautobot.extras.filters.mixins.RelationshipModelFilterSetMixin
nautobot.extras.api.serializers.TaggedObjectSerializer
nautobot.extras.api.serializers.TaggedModelSerializerMixin
nautobot.tenancy.filters.TenancyFilterSet
nautobot.tenancy.filters.mixins.TenancyModelFilterSetMixin
TODO