Release v2.2.109
Released: July 21, 2026
Highlights
- New
gatewayemail backend —EmailConfig(backend="gateway", gateway_url=..., gateway_secret=...)POSTs each message as JSON to a trusted HTTP gateway (e.g. a Cloudflare Worker with an Email Sending binding). The Django app holds no provider credentials. See Email Configuration. EmailConfig.subscribe_url— optional one-click newsletter link rendered as a “P.S.” footer in all system emails built on the shared base template. See Subscribe Footer.- Marketing-consent capture in the OTP flow —
POST /cfg/accounts/otp/request/accepts optionalmarketing_consentandconsent_disclosure_version; on every successful verify the newuser_email_verifiedsignal delivers the consent evidence (choice, disclosure version, jurisdiction hint, verify timestamp) to your receivers. The framework stores no subscription state on the user model. See Marketing Consent Capture. - New endpoint
GET /cfg/accounts/otp/consent-policy/— server-decided default for the consent checkbox (checked/unchecked), derived from the edge-providedCF-IPCountryheader (EU/EEA/UK/CH and unknown →unchecked). - Frontend consent support —
AuthLayoutgained amarketingConsentprop rendering the opt-in checkbox on the identifier step;requestOTP()accepts an optional consent payload; the generateduseCfgAccountsOtpConsentPolicyRetrievehook is re-exported from@djangocfg/api/hooks. See Frontend Integration.
Updated Packages
| Package | Version | Changes |
|---|---|---|
django-cfg (PyPI) | 2.2.109 | Gateway email backend, subscribe_url, OTP consent capture, user_email_verified signal, consent-policy endpoint |
@djangocfg/api | 2.1.478 | requestOTP(identifier, sourceUrl?, consent?), marketingConsent form state, useCfgAccountsOtpConsentPolicyRetrieve |
@djangocfg/layouts | 2.1.478 | AuthLayout marketingConsent prop (checkbox in the identifier step) |
Upgrade
pip install -U django-cfg
python manage.py migrate # accounts migration 0024_otpsecret_consent_capturepnpm update @djangocfg/api @djangocfg/layoutsAll new behavior is opt-in: without gateway/subscribe_url config, without the consent fields in the OTP request, and without the marketingConsent prop, nothing changes.
Breaking Changes
None. The consent fields are optional; existing OTP request bodies remain valid.
Full Changelog
See the GitHub release for the complete list of changes.
Last updated on