Try adding "import re" to the top to import the Python re module. <https://docs.python.org/3.5/library/re.html>
On Fri, Oct 24, 2014 at 8:35 AM, Daniel Grace <[email protected]> wrote: > Thanks people for the info. I was looking for a way to beautify the code, > rather than for performance / compression. In particular I came across this > when I implemented a template tag which, under certain circumstances returns > an empty string. This works well but causes blank lines in the code, if > they are present in the original template. I did find the almostspaceless > template tag on http://kuttler.eu/code/django-almost-spaceless-template-tag/ > but I could not get it to work, as I don't know where "re.sub" comes from. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/d4875909-54b2-4655-b459-c71c4bb7efc9%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADhq2b6C08sYgz4ubqJrtPr4oK3Kiqn5ht4o2GaO7H8Q%2BFeQAg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

