mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Refs #23919 -- Replaced super(ClassName, self) with super().
This commit is contained in:
parent
dc165ec8e5
commit
d6eaf7c018
339 changed files with 1221 additions and 1296 deletions
|
@ -131,7 +131,7 @@ class TemplateContextFeed(TestRss2Feed):
|
|||
description_template = 'syndication/description_context.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(TemplateContextFeed, self).get_context_data(**kwargs)
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['foo'] = 'bar'
|
||||
return context
|
||||
|
||||
|
@ -164,21 +164,21 @@ class MyCustomAtom1Feed(feedgenerator.Atom1Feed):
|
|||
Test of a custom feed generator class.
|
||||
"""
|
||||
def root_attributes(self):
|
||||
attrs = super(MyCustomAtom1Feed, self).root_attributes()
|
||||
attrs = super().root_attributes()
|
||||
attrs['django'] = 'rocks'
|
||||
return attrs
|
||||
|
||||
def add_root_elements(self, handler):
|
||||
super(MyCustomAtom1Feed, self).add_root_elements(handler)
|
||||
super().add_root_elements(handler)
|
||||
handler.addQuickElement('spam', 'eggs')
|
||||
|
||||
def item_attributes(self, item):
|
||||
attrs = super(MyCustomAtom1Feed, self).item_attributes(item)
|
||||
attrs = super().item_attributes(item)
|
||||
attrs['bacon'] = 'yum'
|
||||
return attrs
|
||||
|
||||
def add_item_elements(self, handler, item):
|
||||
super(MyCustomAtom1Feed, self).add_item_elements(handler, item)
|
||||
super().add_item_elements(handler, item)
|
||||
handler.addQuickElement('ministry', 'silly walks')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue