Loading django/contrib/markup/templatetags/markup.py +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ def markdown(value, arg=''): they will be silently ignored. """ import warnings warnings.warn('The markdown filter has been deprecated', category=DeprecationWarning) try: import markdown except ImportError: Loading @@ -72,6 +75,9 @@ def markdown(value, arg=''): @register.filter(is_safe=True) def restructuredtext(value): import warnings warnings.warn('The restructuredtext filter has been deprecated', category=DeprecationWarning) try: from docutils.core import publish_parts except ImportError: Loading django/contrib/markup/tests.py +10 −1 Original line number Diff line number Diff line # Quick tests for the markup templatetags (django.contrib.markup) import re import warnings from django.template import Template, Context from django import test from django.utils import unittest from django.utils.html import escape Loading @@ -21,7 +23,7 @@ try: except ImportError: docutils = None class Templates(unittest.TestCase): class Templates(test.TestCase): textile_content = """Paragraph 1 Loading @@ -37,6 +39,13 @@ Paragraph 2 with a link_ .. _link: http://www.example.com/""" def setUp(self): self.save_warnings_state() warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.contrib.markup') def tearDown(self): self.restore_warnings_state() @unittest.skipUnless(textile, 'textile not installed') def test_textile(self): t = Template("{% load markup %}{{ textile_content|textile }}") Loading docs/internals/deprecation.txt +3 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,9 @@ these changes. in 1.4. The backward compatibility will be removed -- ``HttpRequest.raw_post_data`` will no longer work. * ``django.contrib.markup`` will be removed following an accelerated deprecation. 1.7 --- Loading docs/ref/contrib/markup.txt +3 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ django.contrib.markup .. module:: django.contrib.markup :synopsis: A collection of template filters that implement common markup languages. .. deprecated:: 1.5 This module has been deprecated. Django provides template filters that implement the following markup languages: Loading docs/releases/1.5.txt +8 −0 Original line number Diff line number Diff line Loading @@ -358,3 +358,11 @@ the built-in :func:`itertools.product` instead. The :class:`~django.utils.encoding.StrAndUnicode` mix-in has been deprecated. Define a ``__str__`` method and apply the :func:`~django.utils.encoding.python_2_unicode_compatible` decorator instead. ``django.utils.markup`` ~~~~~~~~~~~~~~~~~~~~~~~ The markup contrib module has been deprecated and will follow an accelerated deprecation schedule. Direct use of python markup libraries or 3rd party tag libraries is preferred to Django maintaining this functionality in the framework. Loading
django/contrib/markup/templatetags/markup.py +6 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ def markdown(value, arg=''): they will be silently ignored. """ import warnings warnings.warn('The markdown filter has been deprecated', category=DeprecationWarning) try: import markdown except ImportError: Loading @@ -72,6 +75,9 @@ def markdown(value, arg=''): @register.filter(is_safe=True) def restructuredtext(value): import warnings warnings.warn('The restructuredtext filter has been deprecated', category=DeprecationWarning) try: from docutils.core import publish_parts except ImportError: Loading
django/contrib/markup/tests.py +10 −1 Original line number Diff line number Diff line # Quick tests for the markup templatetags (django.contrib.markup) import re import warnings from django.template import Template, Context from django import test from django.utils import unittest from django.utils.html import escape Loading @@ -21,7 +23,7 @@ try: except ImportError: docutils = None class Templates(unittest.TestCase): class Templates(test.TestCase): textile_content = """Paragraph 1 Loading @@ -37,6 +39,13 @@ Paragraph 2 with a link_ .. _link: http://www.example.com/""" def setUp(self): self.save_warnings_state() warnings.filterwarnings('ignore', category=DeprecationWarning, module='django.contrib.markup') def tearDown(self): self.restore_warnings_state() @unittest.skipUnless(textile, 'textile not installed') def test_textile(self): t = Template("{% load markup %}{{ textile_content|textile }}") Loading
docs/internals/deprecation.txt +3 −0 Original line number Diff line number Diff line Loading @@ -264,6 +264,9 @@ these changes. in 1.4. The backward compatibility will be removed -- ``HttpRequest.raw_post_data`` will no longer work. * ``django.contrib.markup`` will be removed following an accelerated deprecation. 1.7 --- Loading
docs/ref/contrib/markup.txt +3 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ django.contrib.markup .. module:: django.contrib.markup :synopsis: A collection of template filters that implement common markup languages. .. deprecated:: 1.5 This module has been deprecated. Django provides template filters that implement the following markup languages: Loading
docs/releases/1.5.txt +8 −0 Original line number Diff line number Diff line Loading @@ -358,3 +358,11 @@ the built-in :func:`itertools.product` instead. The :class:`~django.utils.encoding.StrAndUnicode` mix-in has been deprecated. Define a ``__str__`` method and apply the :func:`~django.utils.encoding.python_2_unicode_compatible` decorator instead. ``django.utils.markup`` ~~~~~~~~~~~~~~~~~~~~~~~ The markup contrib module has been deprecated and will follow an accelerated deprecation schedule. Direct use of python markup libraries or 3rd party tag libraries is preferred to Django maintaining this functionality in the framework.