Sunday, November 2, 2014

Re: Warning with 'cycle'

Thanks

Em domingo, 2 de novembro de 2014 02h05min42s UTC-2, Carl Meyer escreveu:
On 11/01/2014 01:36 PM, Neto wrote:
> Hi, im using template tag 'cycle' (in Django version 1.7.1,) and is
> showing it in my terminal:
>
>     RemovedInDjango18Warning: 'The `cycle` template tag is changing to
>     escape its arguments; the non-autoescaping version is deprecated.
>     Load it from the `future` tag library to start using the new behavior.
>
>
> In template:
>
> <div class='{% cycle 'a1' 'a2' %}'></div>
>
> Am I doing something wrong?

Not "wrong", exactly, but you should add a `{% load cycle from future
%}`  at the top of this template to make the behavior more
future-compatible. See the note at the end of the documentation for the
cycle tag:
https://docs.djangoproject.com/en/1.7/ref/templates/builtins/#cycle

Carl

--
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/d7e3f236-cc5d-46be-b247-f7c6c51c673b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment