Warning with 'cycle'

104 views
Skip to first unread message

Neto

unread,
Nov 1, 2014, 3:36:52 PM11/1/14
to django...@googlegroups.com
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?

Carl Meyer

unread,
Nov 2, 2014, 12:05:42 AM11/2/14
to django...@googlegroups.com
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

signature.asc

Neto

unread,
Nov 2, 2014, 10:17:47 AM11/2/14
to django...@googlegroups.com
Thanks
Reply all
Reply to author
Forward
0 new messages