You can put the for statement on one line to get rid of newline chars, e.g. `{% for ... %}item, {% endfor %}`. Alternatively you can use the [spaceless](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#spaceless) tag to remove newlines.