From e84f79f05113f546810c1908c7baef99fb1e874a Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Thu, 3 May 2012 15:27:01 +0200 Subject: Fixed #18042 -- Advanced deprecation warnings. Thanks Ramiro for the patch. --- django/utils/text.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'django/utils/text.py') diff --git a/django/utils/text.py b/django/utils/text.py index 606b15c0ce..f443b31a67 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -206,14 +206,14 @@ class Truncator(SimpleLazyObject): def truncate_words(s, num, end_text='...'): warnings.warn('This function has been deprecated. Use the Truncator class ' - 'in django.utils.text instead.', category=PendingDeprecationWarning) + 'in django.utils.text instead.', category=DeprecationWarning) truncate = end_text and ' %s' % end_text or '' return Truncator(s).words(num, truncate=truncate) truncate_words = allow_lazy(truncate_words, unicode) def truncate_html_words(s, num, end_text='...'): warnings.warn('This function has been deprecated. Use the Truncator class ' - 'in django.utils.text instead.', category=PendingDeprecationWarning) + 'in django.utils.text instead.', category=DeprecationWarning) truncate = end_text and ' %s' % end_text or '' return Truncator(s).words(num, truncate=truncate, html=True) truncate_html_words = allow_lazy(truncate_html_words, unicode) -- cgit v1.3