extensions-website/reviewers/admin.py
Dalai Felinto ea41b28e7c Review: Admin: Show user
This helps to find back some reviews that may need tweaking.
2024-05-08 14:41:27 +02:00

25 lines
599 B
Python

from django.contrib import admin
from django.template.defaultfilters import truncatechars
from .models import CannedResponse, ApprovalActivity
@admin.register(CannedResponse)
class CannedResponseAdmin(admin.ModelAdmin):
def truncate_response(obj):
return truncatechars(obj.response, 50)
truncate_response.short_description = 'Response'
list_display = ('name', truncate_response)
list_filter = ('type',)
@admin.register(ApprovalActivity)
class ReviewActivityAdmin(admin.ModelAdmin):
list_display = (
'__str__',
'user',
'date_created',
)