Releases: CentreForDigitalHumanities/django-shared-core
Prerelease 3.4.0-pre2
You can now set USE_CHAR32_UUIDS=True in settings.py to force char(32) UUIDs in cdh.files. This is necessary when migrating from Django 4 to Django 5 on MariaDB/MySQL. If you didn't use any of the fields in cdh.files you should be safe.
Please note that USE_CHAR32_UUIDS=True only goes for char(32) issues in cdh.files. I will be renaming this setting before main release.
What's Changed
- fix: Use MySQLSafeUUIDField to allow for keeping char(32) UUID fields while upgrading to Django 5
- fix: Remove disfunctional PBKDF2WrappedMD5PasswordHasher by @miggol in #137
Full Changelog: v3.4.0-pre1...v3.4.0-pre2
Prerelease 3.4.0-pre1
A prerelease with which users of DSC can test their applications before full release of v3.4. There may have been slight behavioural changes in cdh.files as a result of necessary bugfixes, the details of which can be found in #132 .
What's Changed
- Support for Django 5.2 (LTS) by @miggol
- cdh.files: various improvements by @tymees in #132
- Simplified logging strategy and a recommended default logging config by @miggol
Full Changelog: v3.3.0...v3.4.0-pre1
Release 3.3
Mostly a bugfixing and compatibility release targeting Django 5.1 and Python 3.11. Also, this is the first release under supervision of yours truly. Hi there!
There are no major changes that users need to be aware of. Thanks to everyone who contributed to this release.
Known issues
- Docs are no longer auto-generated and deployed to the github pages site, as a result of which the information there is dated.
What's Changed
- fix: fixed an XSS exploit in transformat by @tymees in #111
- Avoid deprecated escaping for Python 3.12 by @miggol in #115
- prevent assigning empty for="" attributes to s by @bbonf in #106
- Fix bootstrap built by @tymees in #124
- Avoid logging error on every ApiError by @bbonf in #123
- Fixes required for Django 5.1 support by @miggol in #121
- Fix for vbuild not working on python 3.13 by @bbonf in #131
- Minor SAML/Django-CSP fixes by @tymees in #129
- Quick fix: unfederate django.contrib. auth by @miggol in #128
- Fix github workflows by @miggol in #126
- v3.3 - Update versions and requirements by @miggol in #135
New Contributors
Full Changelog: v3.2.0...v3.3.0
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.mailtoINSTALLED_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_SILENTLYtoFalsein your settings, or provide thefail_silently=Falsekwarg to the varioussendmethods/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 SearchableSelectWidgetnow 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.mailinstead. 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.mailtoINSTALLED_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_SILENTLYtoFalsein your settings, or provide thefail_silently=Falsekwarg to the varioussendmethods/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.mailinstead. 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-headeranduu-navbardivs and content blocks.site-content: wraps around the existinguu-contentdiv and content block.site-footer: wraps around the existinguu-footerdiv and content block.body-classes: can be used to add CSS classes to thebodytagsite-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.htmlis now deprecated and replaced bysite_base.html. (Internallybase.htmlis now an extension ofsite_base.html)language_box.htmlis now deprecated and replaced bysite_language_box.html. (Internallylanguage_box.htmlis 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
CTEVarDefclass - Fixed
BootstrapSelectnot always applying its Bootstrap styles - Added a bootstrap styled version of
MultiWidgetand a corresponding mixin - Added a bootstrap styled version of
SplitDateTimeWidget(using the new widget above) - Added a new
MonthFieldDB field, a customDateFieldwhich tries to ignore the 'day' of a date.- In python, it uses a custom implementation of
datecalledMonth, which is setup to ignore the day. The field remains compatible with normaldateobjects however
- In python, it uses a custom implementation of
- Added a new
BootstrapMonthFieldForm field, to act as the default form field forMonthField. - Added two widgets:
MonthInputandSplitMonthInput. Both act as widgits forBootstrapMonthFieldMonthInputis a single field, which uses themonthinput-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.SplitMonthInputsplits month and year into separate fields usingBootstrapMultiWidget, with month being a dropdown and year an integer field
- Added
MinYearValidatorandMaxYearValidator. They can be used on any date-based DB fieldMonthFieldis setup to read the set values and set the HTMLminandmaxinput 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.htmllanguage_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
CTEVarDefclass - Fixed
BootstrapSelectnot always applying its Bootstrap styles - Added a bootstrap styled version of
MultiWidgetand a corresponding mixin - Added a bootstrap styled version of
SplitDateTimeWidget(using the new widget above) - Added a new
MonthFieldDB field, a customDateFieldwhich tries to ignore the 'day' of a date.- In python, it uses a custom implementation of
datecalledMonth, which is setup to ignore the day. The field remains compatible with normaldateobjects however
- In python, it uses a custom implementation of
- Added a new
BootstrapMonthFieldForm field, to act as the default form field forMonthField. - Added two widgets:
MonthInputandSplitMonthInput. Both act as widgits forBootstrapMonthFieldMonthInputis a single field, which uses themonthinput-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.SplitMonthInputsplits month and year into separate fields usingBootstrapMultiWidget, with month being a dropdown and year an integer field
- Added
MinYearValidatorandMaxYearValidator. They can be used on any date-based DB fieldMonthFieldis setup to read the set values and set the HTMLminandmaxinput 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-headeranduu-navbardivs and content blocks.site-content: wraps around the existinguu-contentdiv and content block.site-footer: wraps around the existinguu-footerdiv and content block.body-classes: can be used to add CSS classes to thebodytagsite-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.htmlis now deprecated and replaced bysite_base.html. (Internallybase.htmlis now an extension ofsite_base.html)language_box.htmlis now deprecated and replaced bysite_language_box.html. (Internallylanguage_box.htmlis 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.htmllanguage_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_APPSandMIDDLEWAREadditions are now provided through listsSAML_APPSandSAML_MIDDLEWAREin 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