Support for Python 3.10 and Django 4.0, drop Python 3.5, Python 3.6, Django 1.9,...
[django-cas-provider.git] / cas_provider / admin.py
index 5934487..90182e2 100644 (file)
@@ -1,11 +1,29 @@
 from django.contrib import admin
 from django.contrib import admin
+from .models import *
 
 
-from cas_provider.models import ServiceTicket, LoginTicket
 
 class ServiceTicketAdmin(admin.ModelAdmin):
 
 class ServiceTicketAdmin(admin.ModelAdmin):
-    pass
-admin.site.register(ServiceTicket, ServiceTicketAdmin)
+    list_display = ('user', 'service', 'created')
+    list_filter = ('created',)
+
+class ProxyTicketAdmin(admin.ModelAdmin):
+    list_display = ('user', 'service', 'created')
+    list_filter = ('created',)
 
 class LoginTicketAdmin(admin.ModelAdmin):
 
 class LoginTicketAdmin(admin.ModelAdmin):
-    pass
-admin.site.register(LoginTicket, LoginTicketAdmin)
\ No newline at end of file
+    list_display = ('ticket', 'created')
+    list_filter = ('created',)
+
+class ProxyGrantingTicketAdmin(admin.ModelAdmin):
+    list_display = ('ticket', 'created')
+    list_filter = ('created',)
+
+class ProxyGrantingTicketIOUAdmin(admin.ModelAdmin):
+    list_display = ('ticket', 'created')
+    list_filter = ('created',)
+
+admin.site.register(ServiceTicket, ServiceTicketAdmin)
+admin.site.register(ProxyTicket, ProxyTicketAdmin)
+admin.site.register(LoginTicket, LoginTicketAdmin)
+admin.site.register(ProxyGrantingTicket, ProxyGrantingTicketAdmin)
+admin.site.register(ProxyGrantingTicketIOU, ProxyGrantingTicketIOUAdmin)