mirror of https://github.com/django/django.git
Refs #24728 - Removed Atom1Feed/RssFeed mime_type attribute.
Per deprecation timeline.
This commit is contained in:
parent
3cee9edd1b
commit
c6de8cca20
|
@ -278,15 +278,6 @@ class RssFeed(SyndicationFeed):
|
||||||
def endChannelElement(self, handler):
|
def endChannelElement(self, handler):
|
||||||
handler.endElement("channel")
|
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):
|
class RssUserland091Feed(RssFeed):
|
||||||
_version = "0.91"
|
_version = "0.91"
|
||||||
|
@ -445,15 +436,6 @@ class Atom1Feed(SyndicationFeed):
|
||||||
if item['item_copyright'] is not None:
|
if item['item_copyright'] is not None:
|
||||||
handler.addQuickElement("rights", item['item_copyright'])
|
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
|
# This isolates the decision of what the system default is, so calling code can
|
||||||
# do "feedgenerator.DefaultFeed" instead of "feedgenerator.Rss201rev2Feed".
|
# 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
|
* Support for custom error views that don't accept an ``exception`` parameter
|
||||||
is removed.
|
is removed.
|
||||||
|
|
||||||
|
* The ``mime_type`` attribute of ``django.utils.feedgenerator.Atom1Feed`` and
|
||||||
|
``django.utils.feedgenerator.RssFeed`` is removed.
|
||||||
|
|
Loading…
Reference in New Issue