mirror of
https://github.com/Django-LiveView/demo-alarms
synced 2026-01-09 06:43:41 +01:00
Real-time alert system using Django LiveView with WebSocket support. Features include: - Real-time alert creation, viewing, and deletion - Broadcast notifications to all connected users - SQLite database - Stimulus.js integration for interactive UI - Modal dialogs for alert details - Alert form with validation Fixed Stimulus controller scope issue by placing data-controller on html element.
10 lines
261 B
Python
10 lines
261 B
Python
from django.contrib import admin
|
|
from .models import Alert
|
|
|
|
|
|
@admin.register(Alert)
|
|
class AlertAdmin(admin.ModelAdmin):
|
|
list_display = ('id', 'type', 'description', 'created_at')
|
|
list_filter = ('type', 'created_at')
|
|
search_fields = ('description',)
|