Remove resource_url
This commit is contained in:
parent
9d9454f489
commit
ca7798a9d2
1 changed files with 2 additions and 6 deletions
|
@ -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('<a href="{0}" target="_blank">{1}</a>',
|
||||
str(instance.url).strip("#"), str(instance.url).strip("#"))
|
||||
|
||||
|
||||
class RangeAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('id',)
|
||||
|
|
Loading…
Reference in a new issue