- Published on
Release: Django 3 & Presto Dev Warnings
- Authors
- Name
- Dave Coates
This release contains changes up until release/2020-08-03
.
To upgrade any existing projects it's recommended to pull in the relevant commits from upstream.
git remote add upstream git@gitlab.internal.alliancesoftware.com.au:alliance/template-django.git
git cherry-pick XXX1 XXX2
In cases where you are significantly behind it may be easier to pull the whole app (eg. common_audit
) in but you'll
need to review the relevant branch.
In this release
Main change in this release is support for django 3
Django 3
We now have support for django 3 - big thanks to Levi & Fang for getting it across the line.
See 4ab5d94d for the changes. The big change is we no longer use authtools.
You will also need to upgrade to allianceutils 2.0.0.
Presto dev warnings
A common problem encountered is creating an Endpoint
but incorrectly specifying paginationMiddleware
or
viewModelCachingMiddleware
. This resulted in very confusing situations where data didn't come through
but no clear reason why. As of 0.0.18
Presto will try and warn you when it's not setup correctly.
In addition 2dd39692 introduces a change to trigger a server error when pagination is not setup correctly.
Update to Presto 0.0.18 and pull in commit 2dd39692 to get these changes.
0.0.18 also fixed issue where pagination is incorrectly inferred to be of type limit/offset rather than page number based.
Audit module permissions
If you are using the audit module in a project be aware that by default if a user has permissions to list a model they also get permission to list any audit changes. This may be problematic if the audited fields includes fields that aren't exposed to that user otherwise.
We will be changing the default behaviour soon. If you have a project using it please check that the defaults make sense. If they don't you can either:
Explicitly pass permissions when the audit module is setup
Change the default permission resolution to something custom (eg. add audit specific permissions)
Please see Dave, Levi or Fang if you need assistance.
Other changes
- f73f8923 - Fix @server_choices backend performance
- 3a8d70f2 - Support passing extra options to pdf renderer & default page size to exact A4 dimensions.
- fbab50dd - The
perm
kwarg toserver_choices
now accepts either single permission or list of permissions. - a78fd124 - Audit with
exclude
option now correctly supports many to many fields - 6117c726 - Fix incorrect link to delete page from detail view
- 53d8e409 - CRUD delete previously broke if a model
__str__
method referenced the primary key. This is now fixed. - bbaccee1 - Add support for codegen List fields for Presto ViewModel
- f83fb137, 991ed36a, 5f6980cb - Version updates: Node 16, Ubuntu 20 (ci), postgres 13
- e26dae5c - Fix cause of intermittent failures of the LHCI job in CI
- 8bc03e0a - Removed unused import from codegen files
- 676e83d7 - Remove unused antd-dayjs-webpack-plugin
- 13dbfdd5 - Remove duplicate test utility classes
- e9ae8670 - React Suspense rendering improvements
- 4a0d32fe, 4d4311aa, 708d73c9 - Add method to consistently override antd styles
Upcoming
Next major change is the 0.2.0 release of csvpermissions with some core API changes & full documentation.