Created
December 1, 2014 16:15
-
-
Save MarkusH/d7faa8326b2e064c90e7 to your computer and use it in GitHub Desktop.
TEMPLATE_STRING_IF_INVALID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InvalidString(str): | |
def __mod__(self, other): | |
print(">>> DJANGO TEMPLATE ERROR: Undefined variable or unknown value for: \"%s\"" % other) | |
TEMPLATE_STRING_IF_INVALID = InvalidString("%s") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment