tags:

views:

70

answers:

1

& g t ; Welcome

How do I show the actual symbol instead? Is it a template filter?

Thanks.

+5  A: 

Bit hard to know without more details. If it's from data that you're passing in from the view, you might want to use mark_safe.

from django.utils.safestring import mark_safe

def your_view(request):
    ...
    foo = '>'
    mark_safe(foo)
    ...

Otherwise, you want the safe filter:

{{ myvar|safe }}

Obviously, be careful with this, make sure the variable actually is safe, otherwise you'll open yourself up to cross-site scripting attacks and the like. There's a reason Django escapes this stuff.

Dominic Rodger