Configure yearly summer voucher parameters and email templates from admin site#3834
Configure yearly summer voucher parameters and email templates from admin site#3834nikomakela merged 19 commits intomainfrom
Conversation
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
|
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
APPLICANT is deployed to platta: https://helsinkilisa-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe youth result is failed for https://nuortenkesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
|
APPLICANT is deployed to platta: https://helsinkilisa-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
TestCafe employer result is failed for https://kesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |
TestCafe youth result is failed for https://nuortenkesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |
TestCafe result is success for https://helsinkilisa-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://helsinkilisa-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe youth result is failed for https://nuortenkesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |
YJDH-694. Implemented a database-driven email system using a new EmailTemplate model, replacing hardcoded strings. This change allows content to be managed directly via the Django Admin. Key additions: - A restoration system (management command & Admin button) to sync templates from files to the database. - An admin action to reinitialize existing templates from source files. - An admin action to send preview emails to currently logged in user. - Updated application logic to source content from the database. - New tests covering the service logic and management commands. Add preview functionality for email templates in Django admin interface: - Add preview view in admin with mock context generation - Implement template syntax validation for subject, HTML body, and text body - Create MockContextService to generate mock contexts for different template types - Add custom admin templates for preview UI Also, make it possible to send selected email previews to your own mail box. Regenerate email text body on every template save: Make `body_text` field read only and always regenerate it (from `html_body`) on save. WIP
YJDH-694. Add references to submodules in the Kesaseteli's root README. Add documentation for yearly summer voucher configuration and email templates management.
YJDH-694. Convert TargetGroupValidationService methods to static methods. Since TargetGroupValidationService validation logic is purely functional and doesn't rely on any instance state, staticmethod is the correct and more pythonic choice.
YJDH-694. Add description property to target group sub classes to be used to explain to admin user, what the rules are for validation. Add the description proeprty also to target group serializer.
YJDH-694. Add a custom admin site to Kesäseteli. Context Injection: The each_context method injects password_login_disabled (boolean) into the template context. This allows hel_login.html to conditionally hide the login form. Login View Override: The login method checks PASSWORD_LOGIN_DISABLED setting. If True, it raises PermissionDenied, effectively blocking the authentication method for the admin site.
YJDH-694. Add a custom admin site to Kesäseteli. Context Injection: The each_context method injects password_login_disabled (boolean) into the template context. This allows hel_login.html to conditionally hide the login form. Login View Override: The login method checks PASSWORD_LOGIN_DISABLED setting. If True, it raises PermissionDenied, effectively blocking the authentication method for the admin site.
877bf69 to
8d5f829
Compare
|
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
|
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
APPLICANT is deployed to platta: https://helsinkilisa-ui-pr3834.dev.hel.ninja 🚀🚀🚀 |
|
YJDH-HELSINKILISA-API branch is deployed to platta: https://helsinkilisa-pr3834.api.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://helsinkilisa-ui-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://helsinkilisa-ui-handler-pr3834.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe youth result is failed for https://nuortenkesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |
1 similar comment
TestCafe youth result is failed for https://nuortenkesaseteli-pr3834.dev.hel.ninja 😿💢💥💥 |







YJDH-694.
Pipeline configurations are in https://dev.azure.com/City-of-Helsinki/yjdh-kesaseteli/_git/yjdh-kesaseteli-pipelines/pullrequest/14139