Files
bugsink/events/renderers.py
Klaas van Schelven 5bb4dc1f20 Expose event stacktrace as markdown
Adds a `stacktrace_md` field to EventSerializer and a `/stacktrace` action
returning the same markdown (but as the full response).

Also switches `data` to use `get_parsed_data()` (as it should have) and
in json dict format (rather than str).
2025-09-15 15:13:02 +02:00

11 lines
277 B
Python

from rest_framework.renderers import BaseRenderer
class MarkdownRenderer(BaseRenderer):
media_type = "text/markdown"
format = "md"
charset = "utf-8"
def render(self, data, accepted_media_type=None, renderer_context=None):
return data.encode("utf-8")