Files
mayan-edms/mayan/apps/weblinks/admin.py
Roberto Rosario 596b5ccf67 MVP of the weblinks app
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-07-01 15:43:15 -04:00

16 lines
433 B
Python

from __future__ import unicode_literals
from django.contrib import admin
from .models import WebLink
@admin.register(WebLink)
class WebLinkAdmin(admin.ModelAdmin):
def document_type_list(self, instance):
return ','.join(
instance.document_types.values_list('label', flat=True)
)
filter_horizontal = ('document_types',)
list_display = ('label', 'template', 'enabled', 'document_type_list')