mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Fix PendingDeprecationWarning for cycle tag on Django 1.6+
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load admin_list i18n %}
|
||||
{% load url from future %}
|
||||
{% load cycle from djrill_future %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/changelists.css" />
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load admin_list i18n %}
|
||||
{% load url from future %}
|
||||
{% load cycle from djrill_future %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/changelists.css" />
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load admin_list i18n %}
|
||||
{% load url from future %}
|
||||
{% load cycle from djrill_future %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}admin/css/changelists.css" />
|
||||
|
||||
0
djrill/templatetags/__init__.py
Normal file
0
djrill/templatetags/__init__.py
Normal file
16
djrill/templatetags/djrill_future.py
Normal file
16
djrill/templatetags/djrill_future.py
Normal file
@@ -0,0 +1,16 @@
|
||||
# Future templatetags library that is also backwards compatible with
|
||||
# older versions of Django (so long as Djrill's code is compatible
|
||||
# with the future behavior).
|
||||
|
||||
from django import template
|
||||
|
||||
# Django 1.8 changes autoescape behavior in cycle tag.
|
||||
# Djrill has been compatible with future behavior all along.
|
||||
try:
|
||||
from django.templatetags.future import cycle
|
||||
except ImportError:
|
||||
from django.template.defaulttags import cycle
|
||||
|
||||
|
||||
register = template.Library()
|
||||
register.tag(cycle)
|
||||
Reference in New Issue
Block a user