Login

Tag "conditional-parsing"

Snippet List

Conditional template parsing block

I'm developing a regionalization extension based on PostGIS and GeoDjango for a web-based LCA software. Because PostGIS (or PostgreSQL) is not available everywhere, we needed a way to fully disable the geographic extensions. Because of that, I set out to create a template block tag which only gets evaluated when GIS support is active and totally ignored (treated as a comment) otherwise. I had some problems getting my BoringNode to work (which should just pass the content through), so I've just used the AutoEscapeControlNode (why? Because it was the first usable class that jumped into my eye.) for this purpose.

  • template-tag
  • conditional-parsing
Read More
Author: mk
  • 0
  • 0

1 snippet posted so far.