Skip to content

included_serializers should be imported in meta class #858

@sliverc

Description

@sliverc

There is a method utils.get_included_serializers which handles importing of included serializers as a serializer can also be defined as string.

This method is called a couple of times during one request (e.g. in the renderer, resource validation etc.). It is much cleaner though to import this in the serializer meta class at import time so it only needs to be done once. In the code someone can then easily access serializer.included_serializers without using a utility.

This should also bring a performance benefit (even though this would be very small I guess).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions