Django 1.7 `firstof`/`cycle` deprecation

Issue #153 new
Anonymous created an issue

Django 1.7 throws warnings when rendering admin tools templates:

  • (...)/django/template/base.py:290: RemovedInDjango18Warning: 'The firstof 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.
  • (...)/django/template/base.py:290: 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.

Should be easy to fix. Just add {% load firstof cycle from future %} to the templates. The {% filter force_escape %} filter around {% firstof ... %} in admin_tools/theming/templates/admin/base.html becomes redundant now. You are passing html safe arguments to firstof and cycle tags in all other templates, so the change shouldn't affect their results.

Comments (0)

  1. Log in to comment