Releases: CentreForDigitalHumanities/django-shared-core
Release 3.2
Release 3.2
So, this is my last release as maintainer of this project. Sad noises :(
It's been interesting to see a project which was originally just a bad way to fix a non-problem turn out into a foundation for more than 10 applications. Talking about legacy :P
Anyway, so long, and thanks for all the fish
What's Changed
Features:
- New mailing code:
cdh.mail
; this new version is compatible with Django >=4.2- It's API-compatible with
cdh.core.mail
, so just update the imports/base templates. (Don't forget to addcdh.mail
toINSTALLED_APPS
) - Note: the new code is 'fault-permissive'; any exceptions thrown during sending are now catched (and logged) by default. If you depend on the old behavior either set
CDH_EMAIL_FAIL_SILENTLY
toFalse
in your settings, or provide thefail_silently=False
kwarg to the varioussend
methods/functions.
- It's API-compatible with
- Fake form field for headers etc by @tymees in #90
- This can be used to display static text as part of the form, without resorting to JS injection of said text. See the custom form page in the dev project
- New vue-based list (UUList) by @tymees in #89
- Replacement for Fancy-List
- feat: added Django 5 support by @tymees in #93
- Feature/js search widget by @tymees in #95
- Uses Select2 as a simple widget, no own JS/CSS required
- New date widgets hardcoded to use dutch formatting:
BootstrapDateInput
,BootstrapSplitDateInput
Fixes:
- use window.jQuery instead of window.$ to avoid clashes by @bbonf in #99
- Saver thread-local storage for
ThreadLocalStorageMiddleware
- Validation errors are now visible when using
SearchableSelectWidget
SearchableSelectWidget
now correctly takes the width it's given on the page.
Deprecations
- File-loader utilities in
cdh.core
; use Form Media instead cdh.core.mail
, usecdh.mail
instead. The old code is not usable in Django versions >= 4.2
Docs:
Known problems
cdh.core.mail
does not work with Django >=4.2; Migrate to cdh.mail
for a working implementation
Full Changelog: v3.1.0...v3.2.0
v3.2.0 alpha 0
TODO: write release notes :o
What's Changed
Features:
- New mailing code:
cdh.mail
; this new version is compatible with Django >=4.2- It's API-compatible with
cdh.core.mail
, so just update the imports/base templates. (Don't forget to addcdh.mail
toINSTALLED_APPS
) - Note: the new code is 'fault-permissive'; any exceptions thrown during sending are now catched (and logged) by default. If you depend on the old behavior either set
CDH_EMAIL_FAIL_SILENTLY
toFalse
in your settings, or provide thefail_silently=False
kwarg to the varioussend
methods/functions.
- It's API-compatible with
- Fake form field for headers etc by @tymees in #90
- This can be used to display static text as part of the form, without resorting to JS injection of said text. See the custom form page in the dev project
- New vue-based list (UUList) by @tymees in #89
- Replacement for Fancy-List
- feat: added Django 5 support by @tymees in #93
- Feature/js search widget by @tymees in #95
- Uses Select2 as a simple widget, no own JS/CSS required
Fixes:
- use window.jQuery instead of window.$ to avoid clashes by @bbonf in #99
- Saver thread-local storage for
ThreadLocalStorageMiddleware
Deprecations
- File-loader utilities in
cdh.core
; use Form Media instead cdh.core.mail
, usecdh.mail
instead. The old code is not usable in Django versions >= 4.2
Docs:
Full Changelog: v3.1.0...v3.2.0-alpha.0
Version 3.1.0
What's Changed
Core
- Updated uu-bootstrap to version 1.4.0
minimal.html
: new content blocks added:site-header
: wraps around the existinguu-header
anduu-navbar
divs and content blocks.site-content
: wraps around the existinguu-content
div and content block.site-footer
: wraps around the existinguu-footer
div and content block.body-classes
: can be used to add CSS classes to thebody
tagsite-container-classes
: can be used to add CSS classes to theuu-root-container
- New base template:
tool_base.html
, which is a preset base template for the new 'tool' visual design base.html
is now deprecated and replaced bysite_base.html
. (Internallybase.html
is now an extension ofsite_base.html
)language_box.html
is now deprecated and replaced bysite_language_box.html
. (Internallylanguage_box.html
is now an extension ofsite_language_box.html
)- Added the ability to mark Custom Templated Email variables as 'HTML-safe', using a new 'safe' kwarg in the
CTEVarDef
class - Fixed
BootstrapSelect
not always applying its Bootstrap styles - Added a bootstrap styled version of
MultiWidget
and a corresponding mixin - Added a bootstrap styled version of
SplitDateTimeWidget
(using the new widget above) - Added a new
MonthField
DB field, a customDateField
which tries to ignore the 'day' of a date.- In python, it uses a custom implementation of
date
calledMonth
, which is setup to ignore the day. The field remains compatible with normaldate
objects however
- In python, it uses a custom implementation of
- Added a new
BootstrapMonthField
Form field, to act as the default form field forMonthField
. - Added two widgets:
MonthInput
andSplitMonthInput
. Both act as widgits forBootstrapMonthField
MonthInput
is a single field, which uses themonth
input-type. This type is not supported by all browsers, but the widget will still work in browsers that do not support the type natively. It is used by default byBootstrapMonthField
.SplitMonthInput
splits month and year into separate fields usingBootstrapMultiWidget
, with month being a dropdown and year an integer field
- Added
MinYearValidator
andMaxYearValidator
. They can be used on any date-based DB fieldMonthField
is setup to read the set values and set the HTMLmin
andmax
input attributes accordingly.
New Apps
- Federated Auth app - an app to easily integrate SAML authentication into a Django project; uses PySAML2 in the backend, with custom tooling for easy configuration, more user-friendly UI and CSP compatibility.
- Integration platform app - an app integrating API resources (using
cdh.rest
) from the UU integration platform. Currently implementing the Token API and the Identity API
Misc
- Modular dependency managing - Only install the dependencies for the Django Apps you're actually using
Migrating
This release should be backwards compatible with older 3.x
releases. If you find a regression, please open an issue.
However, there is a breaking change in the dependency in how you you specify this library as a dependency.
In addition, there are some recommended base template changes.
Dependency listing
Even though this is a minor release, there is a breaking change regarding dependencies. You are now required list the optional dependencies for the apps you use in your requirements.txt. Use [all] to get the old behaviour of all dependencies. See the updated README for more info
Template changes
Please switch from the deprecated base templates to the new ones:
base.html
->site_base.html
language_box.html
->site_language_box.html
The old files will be removed in the next major update.
Some additional notes on minimal.html
:
These changes to minimal.html
were necessary as, unlike its name would suggest, the template was not minimal enough. In other words, they were still too opinionated on how to use the UU-layout. To preserve backwards compatibility only new content blocks were added. However, it is likely that more drastic changes will be made in a future major update, like moving the uu-header
and uu-navbar
content blocks to the other base templates that extend it.
Thus, if you use minimal.html
as your base template, it is recommended you only extend the new site-{x}
content blocks in your app-specific base template. Please also consider extending site_base.html
instead.
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.0.2...v3.1.0
Version 3.1.0 Alpha 6
What's Changed
Core
- Added the ability to mark Custom Templated Email variables as 'HTML-safe', using a new 'safe' kwarg in the
CTEVarDef
class - Fixed
BootstrapSelect
not always applying its Bootstrap styles - Added a bootstrap styled version of
MultiWidget
and a corresponding mixin - Added a bootstrap styled version of
SplitDateTimeWidget
(using the new widget above) - Added a new
MonthField
DB field, a customDateField
which tries to ignore the 'day' of a date.- In python, it uses a custom implementation of
date
calledMonth
, which is setup to ignore the day. The field remains compatible with normaldate
objects however
- In python, it uses a custom implementation of
- Added a new
BootstrapMonthField
Form field, to act as the default form field forMonthField
. - Added two widgets:
MonthInput
andSplitMonthInput
. Both act as widgits forBootstrapMonthField
MonthInput
is a single field, which uses themonth
input-type. This type is not supported by all browsers, but the widget will still work in browsers that do not support the type natively. It is used by default byBootstrapMonthField
.SplitMonthInput
splits month and year into separate fields usingBootstrapMultiWidget
, with month being a dropdown and year an integer field
- Added
MinYearValidator
andMaxYearValidator
. They can be used on any date-based DB fieldMonthField
is setup to read the set values and set the HTMLmin
andmax
input attributes accordingly.
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.1.0-alpha-5...v3.1.0-alpha-6
v3.1.0-alpha-5
What's Changed
Core
- Updated uu-bootstrap to 1.4.0-alpha.1
minimal.html
: new content blocks added:site-header
: wraps around the existinguu-header
anduu-navbar
divs and content blocks.site-content
: wraps around the existinguu-content
div and content block.site-footer
: wraps around the existinguu-footer
div and content block.body-classes
: can be used to add CSS classes to thebody
tagsite-container-classes
: can be used to add CSS classes to theuu-root-container
- New base template:
tool_base.html
, which is a preset base template for the new 'tool' visual design base.html
is now deprecated and replaced bysite_base.html
. (Internallybase.html
is now an extension ofsite_base.html
)language_box.html
is now deprecated and replaced bysite_language_box.html
. (Internallylanguage_box.html
is now an extension ofsite_language_box.html
)
Federated Auth
- Updated uu-bootstrap to 1.4.0-alpha.1
Migrating
This release should be backwards compatible with older 3.x
releases. If you find a regression, please open an issue.
However, it is recommended you do make some changes to your app to ease migrating to an upcoming major update:
Please switch from the deprecated base templates to the new ones:
base.html
->site_base.html
language_box.html
->site_language_box.html
Some additional notes on minimal.html
:
These changes to minimal.html
were necessary as, unlike its name would suggest, the template was not minimal enough. In other words, they were still too opinionated on how to use the UU-layout. To preserve backwards compatibility only new content blocks were added. However, it is likely that more drastic changes will be made in a future major update, like moving the uu-header
and uu-navbar
content blocks to the other base templates that extend it.
Thus, if you use minimal.html
as your base template, it is recommended you only extend the new site-{x}
content blocks in your app-specific base template. Please also consider extending site_base.html
instead.
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.1.0-alpha-4...v3.1.0-alpha-5
Version 3.1.0 Alpha 4
What's Changed
Federated Auth
- Required
INSTALLED_APPS
andMIDDLEWARE
additions are now provided through listsSAML_APPS
andSAML_MIDDLEWARE
in the settings file
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.1.0-alpha-3...v3.1.0-alpha-4
Version 3.1.0 Alpha 3
What's Changed
Federated Auth
- Fixed incorrectly capitalized default attribute map
- Prefer HTTP Redirect for logout requests; fixes bug that caused SOAP to be selected without supporting it
- Fixed some signing settings to avoid errors processing AuthnAssertions
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.1.0-alpha-2...v3.1.0-alpha-3
Version 3.1.0 Alpha 2
What's Changed
Federated Auth
- Added new custom SAML LogoutInitView that can handle non-SAML sessions as well
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.1.0-alpha-1...v3.1.0-alpha-2
Version 3.1.0 Alpha 1
What's Changed
Note: Even though this is a minor release, there is a breaking change regarding dependencies. You are now required list the optional dependencies for the apps you use in your requirements.txt
. Use [all]
to get the old behaviour of all dependencies. See the updated README for more info
New
- Federated Auth app - an app to easily integrate SAML authentication into a Django project; uses PySAML2 in the backend, with custom tooling for easy configuration, more user-friendly UI and CSP compatibility.
- Integration platform app - an app integrating API resources (using
cdh.rest
) from the UU integration platform. Currently implementing the Token API and the Identity API - Modular dependency managing - Only install the dependencies for the Django Apps you're actually using
More features are planned for 3.1.0, hence the alpha status. However, the federated auth app is considered to be in beta.
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.0.1...v3.1.0-alpha-1
Version 3.0.2
What's Changed
- Updated uu-bootstrap to 1.3.1 to include some fixes in that release
- Updated department names
Full Changelog: DH-IT-Portal-Development/django-shared-core@v3.0.1...v3.0.2