Add Radeln ohne Alter ride-coordination demo (Django + HTMX + Leaflet)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
commit
5d967c68b5
40 changed files with 2040 additions and 0 deletions
35
rides/admin.py
Normal file
35
rides/admin.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
from django.contrib import admin
|
||||
|
||||
from .models import Availability, Einrichtung, Fahrgast, Profile, Ride
|
||||
|
||||
|
||||
@admin.register(Profile)
|
||||
class ProfileAdmin(admin.ModelAdmin):
|
||||
list_display = ["user", "role"]
|
||||
list_filter = ["role"]
|
||||
|
||||
|
||||
@admin.register(Einrichtung)
|
||||
class EinrichtungAdmin(admin.ModelAdmin):
|
||||
list_display = ["name", "address", "contact"]
|
||||
search_fields = ["name"]
|
||||
|
||||
|
||||
@admin.register(Fahrgast)
|
||||
class FahrgastAdmin(admin.ModelAdmin):
|
||||
list_display = ["name", "einrichtung"]
|
||||
list_filter = ["einrichtung"]
|
||||
search_fields = ["name"]
|
||||
|
||||
|
||||
@admin.register(Availability)
|
||||
class AvailabilityAdmin(admin.ModelAdmin):
|
||||
list_display = ["pilot", "start", "end"]
|
||||
|
||||
|
||||
@admin.register(Ride)
|
||||
class RideAdmin(admin.ModelAdmin):
|
||||
list_display = ["fahrgast", "scheduled_at", "status", "assigned_pilot"]
|
||||
list_filter = ["status", "assigned_pilot"]
|
||||
date_hierarchy = "scheduled_at"
|
||||
autocomplete_fields = ["fahrgast"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue