Skip to content

Commit

Permalink
Merge pull request #3 from earthpyy/admin-site
Browse files Browse the repository at this point in the history
Admin site fix typo
  • Loading branch information
earthpyy authored Dec 9, 2023
2 parents 6fdfaba + 447fa2b commit 78cf369
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions thailand_geography/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ class DistrictAdmin(admin.ModelAdmin):


class SubdistrictAdmin(admin.ModelAdmin):
list_display = ('id', 'province', 'district', 'name_en', 'name_th')
list_display = ('id', 'district', 'name_en', 'name_th')
search_fields = (
'name_en', 'name_th', 'province__name_en', 'province__name_th', 'district__name_en', 'district__name_th',
'name_en', 'name_th', 'district__province__name_en', 'district__province__name_th', 'district__name_en',
'district__name_th',
)
list_select_related = ('district__province',)

def province(self, obj):
return obj.get_province()


admin.site.register(Province, ProvinceAdmin)
admin.site.register(District, DistrictAdmin)
Expand Down

0 comments on commit 78cf369

Please sign in to comment.