Fix RangeNameTranslationAdmin
This commit is contained in:
parent
6f9ca6961c
commit
76f714a257
1 changed files with 9 additions and 1 deletions
10
app/admin.py
10
app/admin.py
|
@ -96,7 +96,15 @@ class TaxonRangeAdmin(admin.ModelAdmin):
|
|||
|
||||
|
||||
class RangeNameTranslationAdmin(admin.ModelAdmin):
|
||||
search_fields = ['range_name_translation']
|
||||
model = RangeNameTranslation
|
||||
search_fields = ['range__range_name', 'language__language']
|
||||
list_display = ['range_name', 'language_translation']
|
||||
|
||||
def range_name(self, obj):
|
||||
return str(obj.range.range_name)
|
||||
|
||||
def country_name(self, obj):
|
||||
return str(obj.language.language) if obj.language else 'None'
|
||||
|
||||
|
||||
class PeopleRangeAdmin(admin.ModelAdmin):
|
||||
|
|
Loading…
Reference in a new issue