summaryrefslogtreecommitdiff
path: root/app/sightings/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2024-05-01 11:44:22 -0500
committerluxagraf <sng@luxagraf.net>2024-05-01 11:44:22 -0500
commit436ed48c5d5f37ed388424efc0ec7389ffee8b81 (patch)
tree61780870fde7b4c5b0a993840ab0bb29c0fec75f /app/sightings/admin.py
parent33e50f81111a5ad7833aa7b5498126468d7f11e8 (diff)
updated code to remove OSMGeoAdmin for django 5
Diffstat (limited to 'app/sightings/admin.py')
-rw-r--r--app/sightings/admin.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/sightings/admin.py b/app/sightings/admin.py
index 610260e..7cc0319 100644
--- a/app/sightings/admin.py
+++ b/app/sightings/admin.py
@@ -1,6 +1,5 @@
import copy
from django.contrib import admin
-from django.contrib.gis.admin import OSMGeoAdmin
from .models import APClass, AP, Sighting, FieldNote
from utils.util import get_latlon
@@ -13,7 +12,7 @@ class APClassAdmin(admin.ModelAdmin):
list_filter = ('kind',)
-class SightingInline(OSMGeoAdmin, admin.StackedInline):
+class SightingInline(admin.ModelAdmin, admin.StackedInline):
"""
This is very fragile and probably a bad idea since I copied this
code straight from Django and it may change, but unless GeoDjango
@@ -98,7 +97,7 @@ class APAdmin(admin.ModelAdmin):
@admin.register(Sighting)
-class SightingAdmin(OSMGeoAdmin):
+class SightingAdmin(admin.ModelAdmin):
list_filter = (('location', admin.RelatedOnlyFieldListFilter), 'pub_date')
list_display = ('ap', 'location', 'pub_date')
search_fields = ['ap__common_name',]