Skip to content

Commit

Permalink
Admin view for connection objects
Browse files Browse the repository at this point in the history
  • Loading branch information
robinharms committed Oct 3, 2024
1 parent a4192ad commit 8a83b54
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions envelope/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from django.contrib import admin
from envelope.models import Connection


@admin.register(Connection)
class ConnectionAdmin(admin.ModelAdmin):
search_fields = ("user__first_name", "user__last_name")
autocomplete_fields = ("user",)
list_filter = [
"online",
"awol",
"online_at",
"offline_at",
"last_action",
]
list_display = [
"user",
"online",
"awol",
"online_at",
"offline_at",
"last_action",
]

0 comments on commit 8a83b54

Please sign in to comment.