diff --git a/app/admin.py b/app/admin.py index ef7bb96..5ff06b2 100644 --- a/app/admin.py +++ b/app/admin.py @@ -84,7 +84,7 @@ class RangeAdmin(admin.ModelAdmin): class OrganizationAdmin(admin.ModelAdmin): - readonly_fields = ('org_num1',) + readonly_fields = ('org_num1', 'org_url',) search_fields = ['organisation_search', 'org_alpha_search', 'organisation_2', 'organisation_3', 'subject'] list_display = ['organisation_english', 'country', 'city'] fieldsets = ( @@ -107,11 +107,15 @@ class OrganizationAdmin(admin.ModelAdmin): 'classes': ('collapse',), 'fields': (('tel', 'email'), 'url', + 'org_url', 'tags', ), }) ) + def org_url(self, instance): + return '%s' % (str(instance.url).strip("#"), str(instance.url).strip("#")) + class FieldAdmin(admin.ModelAdmin): search_fields = ['name']