mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #21939 -- Deprecated loading ssi/url tags from future.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import warnings
|
||||
|
||||
from django.template import Library
|
||||
from django.template import defaulttags
|
||||
|
||||
@@ -6,13 +8,19 @@ register = Library()
|
||||
|
||||
@register.tag
|
||||
def ssi(parser, token):
|
||||
# Used for deprecation path during 1.3/1.4, will be removed in 2.0
|
||||
warnings.warn(
|
||||
"Loading the `ssi` tag from the `future` library is deprecated and "
|
||||
"will be removed in Django 1.9. Use the default `ssi` tag instead.",
|
||||
PendingDeprecationWarning)
|
||||
return defaulttags.ssi(parser, token)
|
||||
|
||||
|
||||
@register.tag
|
||||
def url(parser, token):
|
||||
# Used for deprecation path during 1.3/1.4, will be removed in 2.0
|
||||
warnings.warn(
|
||||
"Loading the `url` tag from the `future` library is deprecated and "
|
||||
"will be removed in Django 1.9. Use the default `url` tag instead.",
|
||||
PendingDeprecationWarning)
|
||||
return defaulttags.url(parser, token)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user