Skip to content

Commit

Permalink
Merge branch 'dev' into dj_42_bck
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.md
  • Loading branch information
wlorenzetti committed Dec 27, 2024
2 parents f18cc6f + c242c81 commit cac624b
Show file tree
Hide file tree
Showing 96 changed files with 6,560 additions and 30,312 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ jobs:
- name: Installing Python requirements
run: |
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r requirements_docker.txt && pip3 install -r requirements_huey.txt"
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r requirements_docker.txt --break-system-packages && pip3 install -r requirements_huey.txt --break-system-packages"
- name: Installing Caching Python requirements
run: |
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/caching/requirements.txt"
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/caching/requirements.txt --break-system-packages"
- name: Installing Filemanager Python requirements
run: |
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/filemanager/requirements.txt"
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/filemanager/requirements.txt --break-system-packages"
- name: Installing Qplotly Python requirements
run: |
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/qplotly/requirements.txt"
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/qplotly/requirements.txt --break-system-packages"
- name: Installing Openrouteservice Python requirements
run: |
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/openrouteservice/requirements.txt && pip3 install -r g3w-admin/openrouteservice/requirements_testing.txt"
docker compose -f docker-compose.${{ matrix.qgis_version }}.yml exec -T g3w-suite sh -c "cd /code/ && pip3 install -r g3w-admin/openrouteservice/requirements.txt --break-system-packages && pip3 install -r g3w-admin/openrouteservice/requirements_testing.txt --break-system-packages"
- name: Building g3w-suite
run: |
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ Admin server for G3W-SUITE written in Python, based on **Django** LTS (v3.2) and

Software releases follow theese main branches as described in the compatibility table:

| Branch | Python | Django | QGIS | [client] | First release | Status |
|------------|----------------|--------|---------------|--------------|---------------|----------------|
| [dev] | 3.10 | 4.2 | 3.34 | dev | Unreleased | ⚠️️ Unstable |
| [v.3.8.x] | 3.10 | 3.2 | 3.34 | 3.10.0 | Jun 2024 | 🪲️ Bug fixing |
| [v.3.7.x] | 3.10 | 3.2 | 3.34 | 3.9.6 | Dec 2023 | 🪲️ Bug fixing |
| [v.3.6.x] | 3.10 | 3.2 | 3.28 | 3.8.15 | May 2023 | 🚨 End of Life |
| [v.3.5.x] | 3.10 | 2.2 | 3.22 | 3.7 | Nov 2022 | 🚨 End of Life |
| [v.3.4.x] | 3.8 | 2.2 | 3.22 | 3.4 | Mar 2022 | 🚨 End of Life |
| [v.3.3.x] | 3.6 | 2.2 | 3.16 | 3.3 | Sep 2021 | 🚨 End of Life |
| [v.3.2.x] | 3.6 | 2.2 | 3.16 | 3.2 | Apr 2021 | 🚨 End of Life |
| [v.3.1.x] | 3.6 | 2.2 | 3.10 | 3.1 | Nov 2020 | 🚨 End of Life |
| [v.3.0.x] | 3.6 | 2.2 | 3.10 | 3.0 | Nov 2020 | 🚨 End of Life |
| [dj22-py3] | 3.6 | 2.2 | [🔗] | | | 🚨 End of Life |
| [py2] | 2.7 | 1.11 | [🔗] | | | 🚨 End of Life |
| Branch | Python | Django | QGIS | [client] | First release | Status |
|------------|--------|----------------|---------------|--------------|---------------|----------------|
| [dev] | 3.12 | 3.2 | 3.34 | dev | Unreleased | ⚠️️ Unstable |
| [v.3.8.x] | 3.10 | 3.2 | 3.34 | 3.10.3 | Sep 2024 | 🪲️ Bug fixing |
| [v.3.7.x] | 3.10 | 3.2 | 3.34 | 3.9.6 | Dec 2023 | 🪲️ Bug fixing |
| [v.3.6.x] | 3.10 | 3.2 | 3.28 | 3.8.15 | May 2023 | 🚨 End of Life |
| [v.3.5.x] | 3.10 | 2.2 | 3.22 | 3.7 | Nov 2022 | 🚨 End of Life |
| [v.3.4.x] | 3.8 | 2.2 | 3.22 | 3.4 | Mar 2022 | 🚨 End of Life |
| [v.3.3.x] | 3.6 | 2.2 | 3.16 | 3.3 | Sep 2021 | 🚨 End of Life |
| [v.3.2.x] | 3.6 | 2.2 | 3.16 | 3.2 | Apr 2021 | 🚨 End of Life |
| [v.3.1.x] | 3.6 | 2.2 | 3.10 | 3.1 | Nov 2020 | 🚨 End of Life |
| [v.3.0.x] | 3.6 | 2.2 | 3.10 | 3.0 | Nov 2020 | 🚨 End of Life |
| [dj22-py3] | 3.6 | 2.2 | [🔗] | | | 🚨 End of Life |
| [py2] | 2.7 | 1.11 | [🔗] | | | 🚨 End of Life |

[dev]: https://github.com/g3w-suite/g3w-admin/tree/dev
[v.3.8.x]: https://github.com/g3w-suite/g3w-admin/tree/v.3.8.x
Expand Down
14 changes: 7 additions & 7 deletions ci_scripts/Dockerfile.deps
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM ubuntu:jammy
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite CI testing" Vendor="Gis3w" Version="1.3"
FROM ubuntu:noble
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite CI testing" Vendor="Gis3w"

ENV DEBIAN_FRONTEND=noninteractive
RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update && apt install -y \
git \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal30 \
libgdal34t64 \
python3-gdal \
python3-pip \
curl \
wait-for-it \
wget \
vim \
wait-for-it \
gdal-bin \
libsqlite3-mod-spatialite \
dirmngr \
xvfb
xvfb \
postgresql-client

# PyQGIS latest version
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu jammy main" | \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu noble main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

Expand Down
14 changes: 7 additions & 7 deletions ci_scripts/Dockerfile.ltr.deps
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
FROM ubuntu:jammy
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite CI testing" Vendor="Gis3w" Version="1.3"
FROM ubuntu:noble
LABEL maintainer="Gis3w" Description="This image is used to prepare build requirements for g3w-suite CI testing" Vendor="Gis3w"

ENV DEBIAN_FRONTEND=noninteractive
RUN chown root:root /tmp && chmod ugo+rwXt /tmp
RUN apt-get update && apt install -y \
git \
libxml2-dev \
libxslt-dev \
postgresql-server-dev-all \
libgdal-dev \
python3-dev \
libgdal30 \
libgdal34t64 \
python3-gdal \
python3-pip \
curl \
wait-for-it \
wget \
vim \
wait-for-it \
gdal-bin \
libsqlite3-mod-spatialite \
dirmngr \
xvfb
xvfb \
postgresql-client

# PyQGIS
RUN curl -sS https://download.qgis.org/downloads/qgis-archive-keyring.gpg > /etc/apt/keyrings/qgis-archive-keyring.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr jammy main" | \
echo "deb [signed-by=/etc/apt/keyrings/qgis-archive-keyring.gpg] https://qgis.org/ubuntu-ltr noble main" | \
tee /etc/apt/sources.list.d/qgis.list && \
apt-get update && apt-get install -y python3-qgis qgis-server

Expand Down
46 changes: 30 additions & 16 deletions g3w-admin/base/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.gis',
#'django.contrib.sites',
'django.contrib.sites',
]

THIRD_PARTY_APPS = [
Expand Down Expand Up @@ -76,7 +76,13 @@
'about',
'django_bleach',
'django_registration',
'captcha'
'captcha',
"allauth",
"allauth.account",
"allauth.socialaccount",
"allauth.socialaccount.providers.microsoft",
"allauth.socialaccount.providers.google",
"allauth.usersessions"
]

G3WADMIN_APPS = [
Expand Down Expand Up @@ -105,6 +111,10 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.contrib.sites.middleware.CurrentSiteMiddleware',
'qdjango.process_events_middleware.process_events_middleware',

# Allauth middleware
'allauth.account.middleware.AccountMiddleware',
'allauth.usersessions.middleware.UserSessionsMiddleware'
]


Expand All @@ -128,10 +138,6 @@
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader'
#('django.template.loaders.cached.Loader', [
# 'django.template.loaders.filesystem.Loader',
# 'django.template.loaders.app_directories.Loader'
#]),
],
},
},
Expand All @@ -143,7 +149,6 @@
ATOMIC_REQUESTS = True

# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand All @@ -163,6 +168,7 @@
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'guardian.backends.ObjectPermissionBackend',
'allauth.account.auth_backends.AuthenticationBackend'
)

GUARDIAN_RAISE_403 = True
Expand All @@ -184,7 +190,7 @@
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/

LANGUAGE_CODE = 'it-it'
LANGUAGE_CODE = 'en'

TIME_ZONE = 'UTC'

Expand All @@ -200,16 +206,16 @@

gettext = lambda s: s
LANGUAGES = (
('it', 'Italian'),
('en', 'English'),
('it', 'Italian'),
('fr', 'French'),
('fi', 'Finnish'),
('se', 'Swedish'), # FIXME: correct language code should be "sv"
('ro', 'Romanian'),
('de', 'Deutsch'),
)

MODELTRANSLATION_DEFAULT_LANGUAGE = 'it'
MODELTRANSLATION_DEFAULT_LANGUAGE = 'en'

# if prefix for default language put in to url
PREFIX_DEFAULT_LANGUAGE = True
Expand Down Expand Up @@ -242,8 +248,6 @@


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/

STATIC_URL = '/static/'

SITE_TITLE = 'g3w-admin'
Expand All @@ -253,7 +257,7 @@
QDJANGO_PRJ_CACHE = True
QDJANGO_PRJ_CACHE_KEY = 'qdjango_prj_'

# data for proxy server
# Data for proxy server
PROXY_SERVER = False

# LOGGING_CONFIG = None
Expand Down Expand Up @@ -304,7 +308,6 @@

SITE_ID = 1


INTERNAL_IPS = [
'127.0.0.1',
]
Expand Down Expand Up @@ -345,7 +348,6 @@

# QPLOTLY DEFAULT SETTINGS
# ------------------------

LOAD_QPLOTLY_FROM_PROJECT = False

# VENDOR KEYS SETTINGS
Expand Down Expand Up @@ -388,4 +390,16 @@
# Settings for ReCaptcha v2. Default checkbox
RECAPTCHA_VERSION2_TYPE = 'checkbox' # or 'invisible'

SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']
SILENCED_SYSTEM_CHECKS = ['captcha.recaptcha_test_key_error']

# SOCIAL ACCOUNT LOGIN SETTINGS
# -----------------------------
SOCIALACCOUNT_LOGIN_ON_GET = True
SOCIALACCOUNT_ADAPTER = 'usersmanage.vendors.allauth.adapter.G3WSocialAccountAdapter'

# Activate/deactivate user login session tracking
USERSESSIONS_TRACK_ACTIVITY = False

SOCIALACCOUNT_ONLY = True
SOCIALACCOUNT_USER_ROLE = 'Viewer Level 1'
ACCOUNT_EMAIL_VERIFICATION = 'none'
4 changes: 4 additions & 0 deletions g3w-admin/base/settings/local_settings_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,7 @@
'worker_type': 'process',
},
}

# For social login
# Activate/deactivate user login session tracking
USERSESSIONS_TRACK_ACTIVITY = False
3 changes: 3 additions & 0 deletions g3w-admin/base/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,11 @@
),
name="django_registration_disallowed",
),
path('allauthg/', include('allauth.urls')),
]



#############################################################
# PASSWORD RESET (user password reset by email)
# USERNAME RECOVERY (username recovery by email)
Expand Down
1 change: 1 addition & 0 deletions g3w-admin/client/static/client/app.min.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions g3w-admin/client/static/client/app.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions g3w-admin/client/static/client/app.min.js.map

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion g3w-admin/client/static/client/css/app.min.css

This file was deleted.

98 changes: 0 additions & 98 deletions g3w-admin/client/static/client/css/vendor.min.css

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions g3w-admin/client/static/client/js/app.min.js

This file was deleted.

1 change: 0 additions & 1 deletion g3w-admin/client/static/client/js/app.min.js.map

This file was deleted.

27,778 changes: 0 additions & 27,778 deletions g3w-admin/client/static/client/js/vendor.min.js

This file was deleted.

1,029 changes: 1,029 additions & 0 deletions g3w-admin/client/static/client/vendor.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions g3w-admin/client/static/client/vendor.min.js.map

Large diffs are not rendered by default.

20 changes: 6 additions & 14 deletions g3w-admin/client/templates/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,20 @@
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no" name="viewport">
<title>{{ page_title }}</title>
<link rel="icon" href="{% if SETTINGS.G3WSUITE_CUSTOM_STATIC_URL and SETTINGS.G3WSUITE_FAVICON %}{{ SETTINGS.G3WSUITE_FAVICON }}{% else %}{% static '/img/favicon.ico' %}{% endif %}">
<link rel="stylesheet" href="{% with client_default|add:"/css/vendor.min.css" as vendor_css %}{% static vendor_css %}{% endwith %}">
<link rel="stylesheet" href="{% with client_default|add:"/css/app.min.css" as app_css %}{% static app_css %}{% endwith %}">
<link rel="stylesheet" href="{% with client_default|add:"/app.min.css" as app_css %}{% static app_css %}{% endwith %}">
{% if SETTINGS.G3WSUITE_CUSTOM_STATIC_URL %}{% for css in SETTINGS.G3WSUITE_CUSTOM_CSS %}
<link rel="stylesheet" type="text/css" href="{{ css }}" />
{% endfor %}{% endif %}
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-{{ skin_class|default:'blue' }} fixed {% if sidebar_collapse %} sidebar-collapse {% endif %}">
<body class="{% if sidebar_collapse %} sidebar-collapse {% endif %}">
{% if SETTINGS.SENTRY_JS %}
{{ SETTINGS.SENTRY_JS | safe }}
{% endif %}
<div id="app">
<app></app>
</div>
<script src="{% with client_default|add:"/js/vendor.min.js" as vendor_js %}{% static vendor_js %}{% endwith %}"></script>
<app id="app"></app>
<script>{{ group_config | safe }}</script>
<script src="{% with client_default|add:"/js/app.min.js" as app_js %}{% static app_js %}{% endwith %}"></script>

<script src="{% with client_default|add:"/vendor.min.js" as vendor_js %}{% static vendor_js %}{% endwith %}"></script>
<script src="{% with client_default|add:"/app.min.js" as app_js %}{% static app_js %}{% endwith %}"></script>
{% if SETTINGS.G3WSUITE_CUSTOM_STATIC_URL %}{% for js in SETTINGS.G3WSUITE_CUSTOM_JS %}
<script src="{{ js }}"></script>
{% endfor %}{% endif %}
Expand Down
Loading

0 comments on commit cac624b

Please sign in to comment.