forked from CGM_Public/pretix_original
Allow markdown rendering in transaction comments. (#621)
This commit allows transaction comments to display newlines and URLs in a useful way, helping when additional data (such as a reference to a ticket system or a longer discussion) is required. This PR also prevents pretix from having to bring its own chat system ;)
This commit is contained in:
committed by
Raphael Michel
parent
f40950efc9
commit
244b767f8f
@@ -106,10 +106,13 @@ class ActionView(View):
|
||||
return self._retry(trans)
|
||||
|
||||
def _comment(self, trans, comment):
|
||||
from pretix.base.templatetags.rich_text import rich_text
|
||||
trans.comment = comment
|
||||
trans.save()
|
||||
return JsonResponse({
|
||||
'status': 'ok'
|
||||
'status': 'ok',
|
||||
'comment': rich_text(comment),
|
||||
'plain': comment,
|
||||
})
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user