1234567891011121314151617 |
- from django.contrib import admin
- from django.contrib.gis.admin import OSMGeoAdmin
- from .models import *
- @admin.register(Marker)
- class MarkerAdmin(OSMGeoAdmin):
- list_display = ["timestamp", "location", "alt", "hdop", "speed"]
- @admin.register(Trip)
- class TripAdmin(admin.ModelAdmin):
- list_display = ["name", "description", "startTime", "endTime", "color", "distance", "topSpeed", "avgSpeed"]
- readonly_fields = ["path", "distance", "topSpeed", "avgSpeed", "ascendHeight", "descendHeight", "movementTime"]
- @admin.register(CensoredLocation)
- class CensoredLocationAdmin(OSMGeoAdmin):
- list_display = ["name", "location", "radius"]
|