Thursday, March 5, 2015

Re: TemplateSyntaxError with {% cycle "Hello, how are you?" "Fine!" %}

Hi Vijay, hi Alasdair,

many thanks for your quick replies!
I've thus just filed a bug: https://code.djangoproject.com/ticket/24451

Am 05.03.2015 um 17:53 schrieb Alasdair Nicol:
> I think the reason is that the cycle tag supports an older syntax for
> backwards compatibility reasons.

Yes, that was my thought, too, but I was wondering if I was accidentally
triggering the old syntax in a somehow "correct" manner that I didn't
quite see...

> A work around would be to assign "Hello, how are you" to a variable.

Yes, thanks!

> If you use single quotes and render the template, it outputs 'Hello',
> not 'Hello, how are you?' as expected.

As expected? Why please? Docs say that with single or double quotes, the
values are treated as string literals.

Best regards,
Carsten

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
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/54F89104.1080903%40cafu.de.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment