admin.py 349 B

123456789101112131415
  1. from __future__ import absolute_import
  2. from django.contrib import admin
  3. from .models import Event, Timestamp
  4. class EventAdmin(admin.ModelAdmin):
  5. list_display = ('dt',)
  6. admin.site.register(Event, EventAdmin)
  7. class TimestampAdmin(admin.ModelAdmin):
  8. readonly_fields = ('created', 'updated')
  9. admin.site.register(Timestamp, TimestampAdmin)