Skip to content

Releases: CentreForDigitalHumanities/django-shared-core

Prerelease 3.4.0-pre2

01 May 13:29

Choose a tag to compare

Prerelease 3.4.0-pre2 Pre-release
Pre-release

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

22 Apr 09:40

Choose a tag to compare

Prerelease 3.4.0-pre1 Pre-release
Pre-release

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

21 Apr 16:05
dca36f4

Choose a tag to compare

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

03 Sep 12:54
4525a60

Choose a tag to compare

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 add cdh.mail to INSTALLED_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 to False in your settings, or provide the fail_silently=False kwarg to the various send methods/functions.
  • 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, use cdh.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

15 Apr 15:58

Choose a tag to compare

v3.2.0 alpha 0 Pre-release
Pre-release

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 add cdh.mail to INSTALLED_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 to False in your settings, or provide the fail_silently=False kwarg to the various send methods/functions.
  • 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, use cdh.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

18 Sep 10:57
22eac08

Choose a tag to compare

What's Changed

Core

  • Updated uu-bootstrap to version 1.4.0
  • minimal.html: new content blocks added:
    • site-header: wraps around the existing uu-header and uu-navbar divs and content blocks.
    • site-content: wraps around the existing uu-content div and content block.
    • site-footer: wraps around the existing uu-footer div and content block.
    • body-classes: can be used to add CSS classes to the body tag
    • site-container-classes: can be used to add CSS classes to the uu-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 by site_base.html. (Internally base.html is now an extension of site_base.html)
  • language_box.html is now deprecated and replaced by site_language_box.html. (Internally language_box.html is now an extension of site_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 custom DateField which tries to ignore the 'day' of a date.
    • In python, it uses a custom implementation of date called Month, which is setup to ignore the day. The field remains compatible with normal date objects however
  • Added a new BootstrapMonthField Form field, to act as the default form field for MonthField.
  • Added two widgets: MonthInput and SplitMonthInput. Both act as widgits for BootstrapMonthField
    • MonthInput is a single field, which uses the month 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 by BootstrapMonthField.
    • SplitMonthInput splits month and year into separate fields using BootstrapMultiWidget, with month being a dropdown and year an integer field
  • Added MinYearValidator and MaxYearValidator. They can be used on any date-based DB field
    • MonthField is setup to read the set values and set the HTML min and max 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

04 Aug 10:51

Choose a tag to compare

Version 3.1.0 Alpha 6 Pre-release
Pre-release

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 custom DateField which tries to ignore the 'day' of a date.
    • In python, it uses a custom implementation of date called Month, which is setup to ignore the day. The field remains compatible with normal date objects however
  • Added a new BootstrapMonthField Form field, to act as the default form field for MonthField.
  • Added two widgets: MonthInput and SplitMonthInput. Both act as widgits for BootstrapMonthField
    • MonthInput is a single field, which uses the month 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 by BootstrapMonthField.
    • SplitMonthInput splits month and year into separate fields using BootstrapMultiWidget, with month being a dropdown and year an integer field
  • Added MinYearValidator and MaxYearValidator. They can be used on any date-based DB field
    • MonthField is setup to read the set values and set the HTML min and max 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

24 Jul 11:08

Choose a tag to compare

v3.1.0-alpha-5 Pre-release
Pre-release

What's Changed

Core

  • Updated uu-bootstrap to 1.4.0-alpha.1
  • minimal.html: new content blocks added:
    • site-header: wraps around the existing uu-header and uu-navbar divs and content blocks.
    • site-content: wraps around the existing uu-content div and content block.
    • site-footer: wraps around the existing uu-footer div and content block.
    • body-classes: can be used to add CSS classes to the body tag
    • site-container-classes: can be used to add CSS classes to the uu-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 by site_base.html. (Internally base.html is now an extension of site_base.html)
  • language_box.html is now deprecated and replaced by site_language_box.html. (Internally language_box.html is now an extension of site_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

03 Jul 14:25

Choose a tag to compare

Version 3.1.0 Alpha 4 Pre-release
Pre-release

What's Changed

Federated Auth

  • Required INSTALLED_APPS and MIDDLEWARE additions are now provided through lists SAML_APPS and SAML_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

03 Jul 11:20

Choose a tag to compare

Version 3.1.0 Alpha 3 Pre-release
Pre-release

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