coalition.content.models.image ============================== .. py:module:: coalition.content.models.image .. autoapi-nested-parse:: Image model for managing images with metadata and attribution. Classes ------- .. autoapisummary:: coalition.content.models.image.Image Module Contents --------------- .. py:class:: Image(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Model for storing images with metadata and attribution information. This model consolidates all image-related functionality across the application, providing proper attribution, licensing, and accessibility information. .. py:attribute:: image .. py:attribute:: title .. py:attribute:: alt_text .. py:attribute:: description .. py:attribute:: author .. py:attribute:: license .. py:attribute:: source_url .. py:attribute:: caption .. py:attribute:: CAPTION_DISPLAY_CHOICES :value: [('below', 'Below Image'), ('overlay', 'Overlay on Image'), ('tooltip', 'Tooltip on Hover'),... .. py:attribute:: caption_display .. py:attribute:: IMAGE_TYPES :value: [('general', 'General Image'), ('hero', 'Hero/Background Image'), ('content', 'Content Image'),... .. py:attribute:: image_type .. py:attribute:: created_at .. py:attribute:: updated_at .. py:attribute:: uploaded_by .. py:class:: Meta .. py:attribute:: db_table :value: 'image' .. py:attribute:: verbose_name :value: 'Image' .. py:attribute:: verbose_name_plural :value: 'Images' .. py:attribute:: ordering :value: ['-created_at'] .. py:method:: __str__() -> str .. py:property:: image_url :type: str Return the URL of the uploaded image, or empty string if no image. .. py:method:: save(*args: Any, **kwargs: Any) -> None Sanitize text fields before saving.