Because of the way Django's template system works, spaces are taken to be separators between arguments. Remember: things you type into templates are not directly interpreted as Python code, and the template language has its own, different-from-Python, ideas about what is and is not acceptable syntax.