2011-11-18 21:01:06 +08:00
|
|
|
from django.contrib import admin
|
|
|
|
|
|
|
|
from .models import Event, Timestamp
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
class EventAdmin(admin.ModelAdmin):
|
|
|
|
list_display = ('dt',)
|
|
|
|
|
2013-11-03 05:34:05 +08:00
|
|
|
|
2011-11-18 21:01:06 +08:00
|
|
|
class TimestampAdmin(admin.ModelAdmin):
|
|
|
|
readonly_fields = ('created', 'updated')
|
|
|
|
|
2016-11-13 01:11:23 +08:00
|
|
|
|
2015-03-31 00:33:26 +08:00
|
|
|
site = admin.AdminSite(name='admin_tz')
|
|
|
|
site.register(Event, EventAdmin)
|
|
|
|
site.register(Timestamp, TimestampAdmin)
|