jumpserver/apps/common/drf/renders/__init__.py

16 lines
363 B
Python
Raw Normal View History

from rest_framework import renderers
from .csv import *
from .excel import *
class PassthroughRenderer(renderers.BaseRenderer):
"""
Return data as-is. View should supply a Response.
"""
2023-09-13 09:05:01 +00:00
media_type = 'application/octet-stream'
format = ''
2023-09-13 09:05:01 +00:00
def render(self, data, accepted_media_type=None, renderer_context=None):
return data