Refs #23919 -- Replaced super(ClassName, self) with super().

This commit is contained in:
chillaranand 2017-01-21 18:43:44 +05:30 committed by Tim Graham
parent dc165ec8e5
commit d6eaf7c018
339 changed files with 1221 additions and 1296 deletions

View file

@ -28,7 +28,7 @@ class ActionAdmin(admin.ModelAdmin):
Remove all entries named 'name' from the ModelAdmin instance URL
patterns list
"""
return [url for url in super(ActionAdmin, self).get_urls() if url.name != name]
return [url for url in super().get_urls() if url.name != name]
def get_urls(self):
# Add the URL of our custom 'add_view' view to the front of the URLs
@ -71,8 +71,10 @@ class Car(models.Model):
class CarAdmin(admin.ModelAdmin):
def response_add(self, request, obj, post_url_continue=None):
return super(CarAdmin, self).response_add(
request, obj, post_url_continue=reverse('admin:admin_custom_urls_car_history', args=[obj.pk]))
return super().response_add(
request, obj,
post_url_continue=reverse('admin:admin_custom_urls_car_history', args=[obj.pk]),
)
site = admin.AdminSite(name='admin_custom_urls')