#3839: carriage returns in template system translate to spaces in output --------------------------------+------------------------------------------- Reporter: [EMAIL PROTECTED] | Owner: adrian Status: new | Component: Template system Version: 0.96 | Keywords: carriage_returns Stage: Unreviewed | Has_patch: 0 --------------------------------+------------------------------------------- Following the templating chapter in http://www.djangobook.com/en/beta/chapter04/. I noticed that my carriage returns were translating to spaces in my output html. {{{ #####views.py##################################### from django.shortcuts import render_to_response def test(request): return render_to_response('test.html') ################################################## #####test.html#################################### <html><body>This is a te st</body></html> ################################################## #####rendered output############################## This is a te st ################################################## }}} The real problem comes when I want to do something like this {{{ ################################################## {% extends 'base.html' %} {% block content %} <p>In {{ hour_offset }} hour {%ifnotequal hour_offset 1%} s {%endnotequal%} , it will be {{ next_time }}.</p> {% endblock %} ################################################### ######rendered output for offset=2, minus extended code## In 2 hour s , it will be 2007-03-27 13:47:20.009487. ######################################################### }}} Note the spaces around the s. This may be a design decision, but it feels very wrong. Python wants whitespace.
-- Ticket URL: <http://code.djangoproject.com/ticket/3839> Django Code <http://code.djangoproject.com/> The web framework for perfectionists with deadlines --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
