From: Alex Kamedov Date: Thu, 7 Apr 2011 06:21:27 +0000 (+0600) Subject: improve admin area X-Git-Tag: 22.4~32^2~22 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/0006d9a177434daef39705f638d1945a5565eb7a?ds=sidebyside;hp=--cc improve admin area --- 0006d9a177434daef39705f638d1945a5565eb7a diff --git a/cas_provider/admin.py b/cas_provider/admin.py index 5091f8e..b240d1f 100644 --- a/cas_provider/admin.py +++ b/cas_provider/admin.py @@ -1,11 +1,13 @@ from django.contrib import admin - -from models import ServiceTicket, LoginTicket +from models import * class ServiceTicketAdmin(admin.ModelAdmin): - pass -admin.site.register(ServiceTicket, ServiceTicketAdmin) + list_display = ('user', 'service', 'created') + list_filter = ('created',) class LoginTicketAdmin(admin.ModelAdmin): - pass -admin.site.register(LoginTicket, LoginTicketAdmin) \ No newline at end of file + list_display = ('ticket', 'created') + list_filter = ('created',) + +admin.site.register(ServiceTicket, ServiceTicketAdmin) +admin.site.register(LoginTicket, LoginTicketAdmin) diff --git a/cas_provider/models.py b/cas_provider/models.py index 5566313..6eecc3e 100644 --- a/cas_provider/models.py +++ b/cas_provider/models.py @@ -2,6 +2,8 @@ from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ +__all__ = ['ServiceTicket', 'LoginTicket'] + class ServiceTicket(models.Model): user = models.ForeignKey(User, verbose_name=_('user')) service = models.URLField(_('service'), verify_exists=False)