OpenDroneMap / WebODM

User-friendly, commercial-grade software for processing aerial imagery. 🛩
https://www.opendronemap.org/webodm/
GNU Affero General Public License v3.0
2.92k stars 965 forks source link

refactor: Update Django to 4.2 LTS #1543

Closed NtskwK closed 2 months ago

NtskwK commented 3 months ago

What's new

Docker-compose:

Version top-level element (obsolete)

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()](https://docs.djangoproject.com/en/4.2/releases/4.0/#:~:text=django.utils.encoding.force_text()%20and%20are%20removed.smart_text())

PostgreSQL JSONField is deprecated

Others

PostGIS Support Matrix: https://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS

unfix:

djangorestframework-simplejwt

there are also many different from django-rest-framework-jwt to djangorestframework-simplejwt. So it can not pass the test in webodm.sh.

rio-tiler

RioTilerBaseModel:warn 'key' access will has been deprecated and will be removed in rio-tiler 7.0."

webpack

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

Docker-compose

Maintainer tag is deprecated

NtskwK commented 3 months ago

1471

pierotofy commented 3 months ago

Thanks @NtskwK :wave: I haven't had a chance to review everything, but a few things stand out right away:

There might be other things that need to be addressed, but these two stood out.

NtskwK commented 3 months ago

Yes, an automated scripts souds good. I see those files are not compatible here. It must be solved.

db\Dockerfile
...
> 83 | VOLUME /var/lib/postgresql/data

I have never tried to migrate database with data. Could you give me some suggest?

NtskwK commented 3 months ago

I have revert to recover migrations files just now.

Then, I found some manual about migration with the old data. But I have no idea for it.

https://www.postgresql.org/docs/current/pgupgrade.html