✅ Purpose
A clickable button inside a ButtonsContainer.
🧩 Fields
text— button texttext_color— RGB color, default#000000text_style— one of:bold,italic,underline,strikethroughbackground_image— optional image (.jpg/.jpeg/.png/.gif/.webp, max 10 MB, 5000×3000)background_color— color, default#FFFFFFbuttons_container— FK to ButtonsContainerowner— FK to Usercreated_at,updated_at
🧠 Properties & methods
-
rendered_background_image- returns
url('media/<file>')ornone
- returns
-
render_html()- uses
BASE_BUTTON_TEMPLATE - embeds placeholders
{{ click_link_<id> }}and{{ double_link_<id> }} - inline styles: color, background, cursor, etc.
- uses
-
copy(user=None, buttons_container=None)- duplicates the button and optionally attaches to another container
-
__str__()→ returnstext
🔗 Relations
- belongs to one ButtonsContainer
- can be referenced by multiple ButtonClick records