summaryrefslogtreecommitdiff
path: root/tests/admin_custom_urls
diff options
context:
space:
mode:
authorchillaranand <anand21nanda@gmail.com>2017-01-21 18:43:44 +0530
committerTim Graham <timograham@gmail.com>2017-01-25 12:23:46 -0500
commitd6eaf7c0183cd04b78f2a55e1d60bb7e59598310 (patch)
treeab02fd9949d4bfa23e27dea45e213ce334c883f0 /tests/admin_custom_urls
parentdc165ec8e5698ffc6dee6b510f1f92c9fd7467fe (diff)
downloaddjango-d6eaf7c0183cd04b78f2a55e1d60bb7e59598310.tar.gz
Refs #23919 -- Replaced super(ClassName, self) with super().
Diffstat (limited to 'tests/admin_custom_urls')
-rw-r--r--tests/admin_custom_urls/models.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/admin_custom_urls/models.py b/tests/admin_custom_urls/models.py
index 840d9b9f38..1fc30ec18c 100644
--- a/tests/admin_custom_urls/models.py
+++ b/tests/admin_custom_urls/models.py
@@ -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')