1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 22:09:36 +02:00

Add geocoding functionality and enhance Adventure model with location fields

This commit is contained in:
Sean Morley 2025-05-22 20:05:13 -04:00
parent 14e71626f6
commit d52e302e9b
8 changed files with 141 additions and 65 deletions

View file

@ -12,6 +12,7 @@ class AdventureAdmin(admin.ModelAdmin):
list_display = ('name', 'get_category', 'get_visit_count', 'user_id', 'is_public')
list_filter = ( 'user_id', 'is_public')
search_fields = ('name',)
readonly_fields = ('city', 'region', 'country')
def get_category(self, obj):
if obj.category and obj.category.display_name and obj.category.icon: