Organization: revert back organization url
This commit is contained in:
parent
6715924065
commit
e95c87e99c
1 changed files with 2 additions and 7 deletions
|
@ -22,7 +22,7 @@ class PersonAdmin(admin.ModelAdmin):
|
||||||
PeopleResourceInline,
|
PeopleResourceInline,
|
||||||
PeopleRangeInline
|
PeopleRangeInline
|
||||||
]
|
]
|
||||||
readonly_fields = ['id', 'organization_url']
|
readonly_fields = ['id']
|
||||||
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country__short_name', 'contact_email']
|
search_fields = ['title', 'first_name', 'last_name', 'organisation', 'position', 'country__short_name', 'contact_email']
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {
|
(None, {
|
||||||
|
@ -31,7 +31,7 @@ class PersonAdmin(admin.ModelAdmin):
|
||||||
('mr_mrs', 'title','full_name', 'position'),
|
('mr_mrs', 'title','full_name', 'position'),
|
||||||
('first_name', 'last_name', 'search_name', 'status'),
|
('first_name', 'last_name', 'search_name', 'status'),
|
||||||
('contact_email', 'email_2', 'skype', 'professional_phone'),
|
('contact_email', 'email_2', 'skype', 'professional_phone'),
|
||||||
('organization', 'organization_url'),
|
'organization',
|
||||||
'personal_url',
|
'personal_url',
|
||||||
'biography',
|
'biography',
|
||||||
'field_of_expertise',
|
'field_of_expertise',
|
||||||
|
@ -69,11 +69,6 @@ class PersonAdmin(admin.ModelAdmin):
|
||||||
ordering = ['full_name']
|
ordering = ['full_name']
|
||||||
# list_display_links = ['id']
|
# 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):
|
class ResourceKeywordInline(admin.TabularInline):
|
||||||
autocomplete_fields = ['keyword']
|
autocomplete_fields = ['keyword']
|
||||||
|
|
Loading…
Reference in a new issue