event-timeline/app/media/admin.py

11 lines
260 B
Python
Raw Permalink Normal View History

2022-04-22 17:20:42 +00:00
from django.contrib import admin
from . import models
@admin.decorators.register(models.Image)
class ImageAdmin(admin.ModelAdmin):
search_fields = ['file']
list_display = ('image_tag', 'file')
readonly_fields = ('image_tag', 'get_absolute_url')