Skip to content

Releases: CentreForDigitalHumanities/django-shared-core

Release 3.2

03 Sep 12:54
4525a60
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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

Version 3.1.0 Alpha 2

15 Jun 11:49
Compare
Choose a tag to compare
Version 3.1.0 Alpha 2 Pre-release
Pre-release

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

09 Jun 13:51
Compare
Choose a tag to compare
Version 3.1.0 Alpha 1 Pre-release
Pre-release

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

03 May 12:53
c1b45b5
Compare
Choose a tag to compare

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