coalition.content.models
Content models package.
Submodules
Classes
Flexible content blocks that can be added to any page. |
|
Model for managing homepage content. |
|
Model for storing images with metadata and attribution information. |
|
Model for managing site themes and branding. |
|
Model for storing videos with metadata and attribution information. |
Package Contents
- class coalition.content.models.ContentBlock(*args, **kwargs)[source]
Bases:
django.db.models.Model
Flexible content blocks that can be added to any page. Allows for dynamic content sections beyond the fixed structure.
- BLOCK_TYPES = [('text', 'Text Block'), ('image', 'Image Block'), ('text_image', 'Text + Image Block'),...
- PAGE_TYPES = [('homepage', 'Homepage'), ('about', 'About Page'), ('campaigns', 'Campaigns Page'), ('contact',...
- LAYOUT_OPTIONS = [('default', 'Text Left, Image Right'), ('reversed', 'Image Left, Text Right'), ('stacked',...
- VERTICAL_ALIGNMENT_OPTIONS = [('top', 'Top'), ('middle', 'Center'), ('bottom', 'Bottom')]
- ANIMATION_OPTIONS = [('fade-in', 'Fade In'), ('slide-up', 'Slide Up'), ('slide-left', 'Slide from Left'),...
- page_type
- title
- block_type
- content
- image
- layout_option
- vertical_alignment
- css_classes
- background_color
- animation_type
- animation_delay
- order
- is_visible
- created_at
- updated_at
- class Meta
- db_table = 'content_block'
- ordering = ['order', 'created_at']
- verbose_name = 'Content Block'
- verbose_name_plural = 'Content Blocks'
- class coalition.content.models.HomePage(*args, **kwargs)[source]
Bases:
django.db.models.Model
Model for managing homepage content. Only one instance should exist - the active homepage configuration.
- theme
- organization_name
- tagline
- hero_title
- hero_subtitle
- hero_background_image
- hero_background_video
- hero_overlay_enabled
- hero_overlay_color
- hero_overlay_opacity
- cta_title
- cta_content
- cta_button_text
- cta_button_url
- facebook_url
- twitter_url
- instagram_url
- linkedin_url
- campaigns_section_title
- campaigns_section_subtitle
- show_campaigns_section
- is_active
- created_at
- updated_at
- class Meta
- db_table = 'homepage'
- verbose_name = 'Homepage Configuration'
- verbose_name_plural = 'Homepage Configurations'
- property hero_background_image_url: str
Return the URL of the hero background image, or empty string if no image.
- class coalition.content.models.Image(*args, **kwargs)[source]
Bases:
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.
- image
- title
- alt_text
- description
- author
- license
- source_url
- caption
- CAPTION_DISPLAY_CHOICES = [('below', 'Below Image'), ('overlay', 'Overlay on Image'), ('tooltip', 'Tooltip on Hover'),...
- caption_display
- IMAGE_TYPES = [('general', 'General Image'), ('hero', 'Hero/Background Image'), ('content', 'Content Image'),...
- image_type
- created_at
- updated_at
- uploaded_by
- class coalition.content.models.Theme(*args, **kwargs)[source]
Bases:
django.db.models.Model
Model for managing site themes and branding. Allows organizations to customize colors, typography, and brand assets.
- name
- description
- hex_color_validator
- primary_color
- secondary_color
- accent_color
- background_color
- section_background_color
- card_background_color
- heading_color
- body_text_color
- muted_text_color
- link_color
- link_hover_color
- heading_font_family
- body_font_family
- google_fonts
- font_size_base
- font_size_small
- font_size_large
- logo
- logo_alt_text
- favicon
- custom_css
- is_active
- created_at
- updated_at
- class coalition.content.models.Video(*args, **kwargs)[source]
Bases:
django.db.models.Model
Model for storing videos with metadata and attribution information.
This model handles video content across the application, providing proper attribution, licensing, and accessibility information.
- video
- title
- alt_text
- description
- author
- license
- source_url
- VIDEO_TYPES = [('general', 'General Video'), ('hero', 'Hero/Background Video'), ('content', 'Content Video'),...
- video_type
- autoplay
- loop
- muted
- show_controls
- created_at
- updated_at
- uploaded_by