👔(backend) display css and code in template endpoint
We would like to duplicate a template from the frontend. For that we need to access the css and code of the template. So we add the css and code to the template endpoint.
This commit is contained in:
@@ -157,16 +157,6 @@ class TemplateSerializer(BaseResourceSerializer):
|
||||
]
|
||||
read_only_fields = ["id", "accesses", "abilities"]
|
||||
|
||||
def to_representation(self, instance):
|
||||
"""
|
||||
Modify the output of serialization.
|
||||
"""
|
||||
representation = super().to_representation(instance)
|
||||
# Remove 'css' and 'code' from the representation
|
||||
representation.pop("css", None)
|
||||
representation.pop("code", None)
|
||||
return representation
|
||||
|
||||
|
||||
# pylint: disable=abstract-method
|
||||
class DocumentGenerationSerializer(serializers.Serializer):
|
||||
|
||||
Reference in New Issue
Block a user