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)
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)