Kaydet (Commit) c6de8cca authored tarafından Tim Graham's avatar Tim Graham

Refs #24728 - Removed Atom1Feed/RssFeed mime_type attribute.

Per deprecation timeline.
üst 3cee9edd
......@@ -278,15 +278,6 @@ class RssFeed(SyndicationFeed):
def endChannelElement(self, handler):
handler.endElement("channel")
@property
def mime_type(self):
warnings.warn(
'The mime_type attribute of RssFeed is deprecated. '
'Use content_type instead.',
RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
class RssUserland091Feed(RssFeed):
_version = "0.91"
......@@ -445,15 +436,6 @@ class Atom1Feed(SyndicationFeed):
if item['item_copyright'] is not None:
handler.addQuickElement("rights", item['item_copyright'])
@property
def mime_type(self):
warnings.warn(
'The mime_type attribute of Atom1Feed is deprecated. '
'Use content_type instead.',
RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
# This isolates the decision of what the system default is, so calling code can
# do "feedgenerator.DefaultFeed" instead of "feedgenerator.Rss201rev2Feed".
......
......@@ -288,3 +288,6 @@ these features.
* Support for custom error views that don't accept an ``exception`` parameter
is removed.
* The ``mime_type`` attribute of ``django.utils.feedgenerator.Atom1Feed`` and
``django.utils.feedgenerator.RssFeed`` is removed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment