coalition.content.models.homepage ================================= .. py:module:: coalition.content.models.homepage .. autoapi-nested-parse:: HomePage model for managing homepage content. Classes ------- .. autoapisummary:: coalition.content.models.homepage.HomePage Module Contents --------------- .. py:class:: HomePage(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Model for managing homepage content. Only one instance should exist - the active homepage configuration. .. py:attribute:: theme .. py:attribute:: organization_name .. py:attribute:: tagline .. py:attribute:: hero_title .. py:attribute:: hero_subtitle .. py:attribute:: hero_background_image .. py:attribute:: hero_background_video .. py:attribute:: hero_overlay_enabled .. py:attribute:: hero_overlay_color .. py:attribute:: hero_overlay_opacity .. py:attribute:: cta_title .. py:attribute:: cta_content .. py:attribute:: cta_button_text .. py:attribute:: cta_button_url .. py:attribute:: facebook_url .. py:attribute:: twitter_url .. py:attribute:: instagram_url .. py:attribute:: linkedin_url .. py:attribute:: campaigns_section_title .. py:attribute:: campaigns_section_subtitle .. py:attribute:: show_campaigns_section .. py:attribute:: is_active .. py:attribute:: created_at .. py:attribute:: updated_at .. py:class:: Meta .. py:attribute:: db_table :value: 'homepage' .. py:attribute:: verbose_name :value: 'Homepage Configuration' .. py:attribute:: verbose_name_plural :value: 'Homepage Configurations' .. py:method:: __str__() -> str .. py:property:: hero_background_image_url :type: str Return the URL of the hero background image, or empty string if no image. .. py:property:: hero_background_video_url :type: str Return the URL of the hero background video, or empty string if no video. .. py:method:: clean() -> None Validate homepage configuration .. py:method:: save(*args: Any, **kwargs: Any) -> None Sanitize HTML fields before saving. .. py:method:: get_active() -> HomePage | None :classmethod: Get the currently active homepage configuration .. py:method:: get_theme() -> Theme | None Get the effective theme for this homepage