1 from django.contrib import admin
3 # Register your models here.
4 from .models import AuthorTag, WorkTag, QuoteTag, Author, Work, Quote
6 @admin.register(Author)
7 class AuthorAdmin(admin.ModelAdmin):
8 fields = ('name', 'birth_date', 'death_date', 'tags',
9 'notes', 'pvt_notes', 'creation_date', 'last_modification')
10 readonly_fields = ('creation_date', 'last_modification')
13 class WorkAdmin(admin.ModelAdmin):
14 fields = ('name', 'author', 'date', 'tags',
15 'notes', 'pvt_notes', 'creation_date', 'last_modification')
16 readonly_fields = ('creation_date', 'last_modification')
18 @admin.register(Quote)
19 class QuoteAdmin(admin.ModelAdmin):
20 fields = ('text', 'work', 'tags',
21 'notes', 'pvt_notes', 'creation_date', 'last_modification')
22 readonly_fields = ('creation_date', 'last_modification')
24 admin.site.register(AuthorTag)
25 admin.site.register(WorkTag)
26 admin.site.register(QuoteTag)