Skip to content

Instantly share code, notes, and snippets.

@minddust
minddust / spaceless_except_pre.py
Last active Jan 1, 2016
Django spaceless with preserved pre formatting
View spaceless_except_pre.py
"""Copyright (c) 2013-2014 Stephan Groß, under MIT license."""
from __future__ import unicode_literals
import re
from django import template
from django.template import Node
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import allow_lazy
You can’t perform that action at this time.