Browse Source

Organization: revert back organization url

fix_refresh_data
PCoder 4 months ago
parent
commit
e95c87e99c
  1. 9
      app/admin.py

9
app/admin.py

@ -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']

Loading…
Cancel
Save