refactor: update Django to 4.2 LTS
What's new
Django 4.2:
Django 4.2 supports PostgreSQL 12 and highe
django.conf.urls.url() is removed.
django.utils.encoding.force_text() and are removed.smart_text()
PostgreSQL JSONField is deprecated
Activate the postgis_raster extension with Django.
Docker-compose:
remove Version top-level element (obsolete)
Docker
set ENV with = (e.g. ENV VAR=xxx)
Others
PostGIS Support Matrix: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
unfix:
djangorestframework-simplejwt (Critical)
there are also many different from django-rest-framework-jwt to djangorestframework-simplejwt. ~~So it can not pass the test in webodm.sh.~~ Login function is broken now. The browser will create window.prompt automatic which is required account and password to instead of the login function. It's necessary to overwrite auth functions.
django-webpack-loader
There is a bug(?) in static template at v1.0.0 or higher version.
Error during template rendering In template /mnt/d/Program/gitwork/WebODM/app/templates/app/base.html
rio-tiler
RioTilerBaseModel:warn 'key' access will has been deprecated and will be removed in rio-tiler 7.0."
webpack
-
(node:5096) [DEP_WEBPACK_DEPRECATION_ARRAY_TO_SET] DeprecationWarning: Compilation.chunks was changed from Array to Set (using Array method 'map' is deprecated)
-
(node:5096) [DEP0040] DeprecationWarning: The
punycodemodule is deprecated. Please use a userland alternative instead. (Usenode --trace-deprecation ...to show where the warning was created) -
WARNING in webpack performance recommendations: webapp | You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
Docker-compose
@pierotofy #1471 #1543
I appreciate the efforts to upgrade Django, Postgres and base system, but there's a lot that needs to be addressed.
My comments from https://github.com/OpenDroneMap/WebODM/pull/1543#issuecomment-2297562263 still haven't been addressed and I don't understand why this was marked as "ready for review".
This is not an easy task and there's a reason it hasn't been done yet; it's a lot of work and needs a solid amount of funding (or a lot of careful work by a dedicated contributor) to be done.