Changes between Initial Version and Version 2 of Ticket #23356


Ignore:
Timestamp:
Sep 15, 2014, 1:29:46 AM (10 years ago)
Author:
shayneoneill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23356 – Description

    initial v2  
    99
    1010BTW: This part of the Django code did not change from 1.6 up to master.
     11
     12For the purposes of anyone coming across this ticket and pulling their hair out over it, heres a template tag that might ease the pain;-
     13{{{
     14
     15from django import template
     16
     17register = template.Library()
     18
     19@register.filter(name='specialbracket')
     20def specialbracket(value):
     21    if value == 'left':
     22        return "{{"
     23    elif value == 'right':
     24        return "}}"
     25    else:
     26        return "??"
     27}}}
     28
     29And the above example solved with this tag;-
     30
     31{{{
     32        <td class="field-{{ident}}">{{ 'left'|specialbracket }} computer.{{field}} {{ 'right'|specialbracket }} </td>
     33
     34}}}
Back to Top