You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
773 B
32 lines
773 B
from django.contrib import admin
|
|
from .models import (
|
|
Statement, Response, Conversation, Tag
|
|
)
|
|
|
|
|
|
class StatementAdmin(admin.ModelAdmin):
|
|
list_display = ('text', )
|
|
list_filter = ('text', )
|
|
search_fields = ('text', )
|
|
|
|
|
|
class ResponseAdmin(admin.ModelAdmin):
|
|
list_display = ('statement', 'response', 'occurrence', )
|
|
search_fields = ['statement__text', 'response__text']
|
|
|
|
|
|
class ConversationAdmin(admin.ModelAdmin):
|
|
list_display = ('id', )
|
|
|
|
|
|
class TagAdmin(admin.ModelAdmin):
|
|
list_display = ('name', )
|
|
list_filter = ('name', )
|
|
search_fields = ('name', )
|
|
|
|
|
|
admin.site.register(Statement, StatementAdmin)
|
|
admin.site.register(Response, ResponseAdmin)
|
|
admin.site.register(Conversation, ConversationAdmin)
|
|
admin.site.register(Tag, TagAdmin)
|