Login

Tag "removetags"

Snippet List

Analogue template filter to removetags that also removes the content of the tag

Django's builtin `removetags` filter removes the supplied tags, but leaves the enclosed text alone. Sometimes you need the complete tag, including its content to go away. Example: <h1>Some headline</h1> <p>Some text</p> Applying `removetags:"h1"` to this html results in Some headline <p>Some text</p> while `killtags:"h1"` leaves <p>Some text</p>

  • filter
  • removetags
Read More

1 snippet posted so far.