coalition.content.admin.image

Admin configuration for Image model.

Classes

ImageAdmin

Admin interface for Image model.

Module Contents

class coalition.content.admin.image.ImageAdmin(model, admin_site)[source]

Bases: django.contrib.admin.ModelAdmin

Admin interface for Image model.

list_display = ('title', 'image_type', 'has_caption', 'author', 'license', 'uploaded_by', 'created_at')[source]
list_filter = ('image_type', 'license', 'created_at', 'uploaded_by')[source]
search_fields = ('title', 'alt_text', 'description', 'author')[source]
readonly_fields = ('created_at', 'updated_at', 'uploaded_by')[source]
fieldsets[source]
has_caption(obj: coalition.content.models.Image) bool[source]

Check if the image has a custom caption.

save_model(request: django.http.HttpRequest, obj: coalition.content.models.Image, form: django.forms.ModelForm, change: bool) None[source]

Set the uploaded_by field to the current user.