Skip to content

Commit

Permalink
Adding format_html() to admin.py
Browse files Browse the repository at this point in the history
This is a fix that helps render html as html tags and not as a plain text.
  • Loading branch information
sofzer authored Jul 29, 2020
1 parent 3e86f57 commit be6b855
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aldryn_translation_tools/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from cms.utils.i18n import get_current_language
from cms.utils.urlutils import admin_reverse

from django.utils.html import format_html

class LinkedRelatedInlineMixin(object):
"""
Expand Down Expand Up @@ -129,7 +130,7 @@ def all_translations(self, obj):
title=title,
)
langs.append(link)
return ''.join(langs)
return format_html(''.join(langs))
all_translations.short_description = 'Translations'
all_translations.allow_tags = True

Expand Down

0 comments on commit be6b855

Please sign in to comment.