I need to generate external links in admin interface grid column, but they shows as html code:
<a href="http://www.site.com/">site</a>
Admin interface translates my links as html-entities and they doesn't shows as right links. Is it possible to show external links there, not html code?
I think list_display_links doesn't work for this purpose.
Thank you!
From stackoverflow
-
Just go further in http://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-display
def colored_name(self): return '<span style="color: #%s;">%s %s</span>' % (self.color_code, self.first_name, self.last_name) colored_name.allow_tags = True
0 comments:
Post a Comment