From ca7798a9d2449b1780e004dca3381cabab6dff6d Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 26 Nov 2021 18:47:20 +0530 Subject: [PATCH] Remove resource_url --- app/admin.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/admin.py b/app/admin.py index 6bcd586..cd8f44e 100644 --- a/app/admin.py +++ b/app/admin.py @@ -47,7 +47,7 @@ class PersonAdmin(admin.ModelAdmin): class ResourceAdmin(admin.ModelAdmin): search_fields = ['title', 'url', 'citation', 'abstract'] - readonly_fields = ['resource_url', 'id'] + readonly_fields = ['id'] list_display = ['title', 'citation', 'type'] fieldsets = ( (None, { @@ -56,7 +56,7 @@ class ResourceAdmin(admin.ModelAdmin): 'title', 'citation', ('type',), - ('url', 'resource_url'), + ('url',), ('lat', 'lon'), 'doi', 'wiki_data_id', @@ -78,10 +78,6 @@ class ResourceAdmin(admin.ModelAdmin): }), ) - def resource_url(self, instance): - return format_html('{1}', - str(instance.url).strip("#"), str(instance.url).strip("#")) - class RangeAdmin(admin.ModelAdmin): readonly_fields = ('id',)