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.
 
 
 
 
 
 

33 lines
1.2 KiB

from django.contrib import admin
from .models import Responce, Question, Question_Responce, Feedback
# Register your models here.
class QuestionAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['session_id', 'question_text']}),
('Date information', {'fields': ['publi_date'], 'classes': ['collapse']}),
]
class ResponceAdmin(admin.ModelAdmin):
fieldsets = [
(None, {'fields': ['session_id', 'responce_text']}),
('Date information', {'fields': ['publi_date'], 'classes': ['collapse']}),
]
class Question_ResponceAdmin(admin.ModelAdmin):
list_display = ('session_id', 'question_text', 'responce_text', 'publi_date',)
list_filter = ('session_id', 'publi_date',)
search_fields = ('session_id', 'responce_text',)
class FeedbackAdmin(admin.ModelAdmin):
list_display = ('session_id', 'question_text', 'date', 'art', 'details',)
list_filter = ('session_id', 'date',)
search_fields = ('session_id', 'details',)
admin.site.register(Question, QuestionAdmin)
admin.site.register(Responce, ResponceAdmin)
admin.site.register(Question_Responce, Question_ResponceAdmin)
admin.site.register(Feedback, FeedbackAdmin)