File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,11 +46,22 @@ def _wrapper(*args, **kwargs):
4646
4747
4848def _base_url () -> str :
49- return (
50- getattr (settings , "FORMS_WORKFLOWS_BASE_URL" , None )
51- or getattr (settings , "SITE_BASE_URL" , None )
52- or ""
49+ """Return the base URL (scheme + domain) for building absolute links in emails.
50+
51+ Checks, in order:
52+ 1. ``settings.FORMS_WORKFLOWS_BASE_URL``
53+ 2. ``settings.SITE_BASE_URL``
54+ 3. First entry in ``settings.CSRF_TRUSTED_ORIGINS``
55+ """
56+ url = getattr (settings , "FORMS_WORKFLOWS_BASE_URL" , None ) or getattr (
57+ settings , "SITE_BASE_URL" , None
5358 )
59+ if url :
60+ return url
61+ origins = getattr (settings , "CSRF_TRUSTED_ORIGINS" , None )
62+ if origins :
63+ return origins [0 ]
64+ return ""
5465
5566
5667def _abs (url_path : str ) -> str :
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " django-forms-workflows"
3- version = " 0.19.0 "
3+ version = " 0.19.1 "
44description = " Enterprise-grade, database-driven form builder with approval workflows and external data integration"
55license = " LGPL-3.0-only"
66readme = " README.md"
You can’t perform that action at this time.
0 commit comments