Organization: revert back organization url

This commit is contained in:
PCoder 2022-01-19 12:28:22 +05:30
parent 6715924065
commit e95c87e99c

View file

@ -22,7 +22,7 @@ class PersonAdmin(admin.ModelAdmin):
PeopleResourceInline,
PeopleRangeInline
]
readonly_fields = ['id', 'organization_url']
readonly_fields = ['id']
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country__short_name', 'contact_email']
fieldsets = (
(None, {
@ -31,7 +31,7 @@ class PersonAdmin(admin.ModelAdmin):
('mr_mrs', 'title','full_name', 'position'),
('first_name', 'last_name', 'search_name', 'status'),
('contact_email', 'email_2', 'skype', 'professional_phone'),
('organization', 'organization_url'),
'organization',
'personal_url',
'biography',
'field_of_expertise',
@ -69,11 +69,6 @@ class PersonAdmin(admin.ModelAdmin):
ordering = ['full_name']
# list_display_links = ['id']
def organization_url(self, instance):
return format_html('<a href="{0}" target="_blank">{1}</a>',
str(instance.organization.url).strip("#") if instance.organization.url else "",
str(instance.organization.url).strip("#") if instance.organization.url else "")
class ResourceKeywordInline(admin.TabularInline):
autocomplete_fields = ['keyword']