/g3w-admin

Server module for G3W-SUITE

Primary LanguageJavaScriptMozilla Public License 2.0MPL-2.0

G3W-Suite CI Tests License

G3W-ADMIN

Admin server for G3W-SUITE written in Python, based on Django LTS (v3.2) and QGIS Server LTR (v3.28)

Admin GUI


Versions and Branches

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

Branch Python Django QGIS client First release Status
dev 3.10 3.2 3.28 dev Unreleased ⚠️️ Unstable
v.3.6.x 3.10 3.2 3.28 3.8.5 May 2023 🪲️ Bug fixing
v.3.5.x 3.10 2.2 3.22 3.7 Nov 2022 🪲️ Bug fixing
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

Project setup

Docker Compose

It's strongly recommended to follow the g3w-suite-docker installation instructions (which already bundles a full blown NGINX + PostgreSQL setup), as such installation method speed up development and deployment and would cause you fewer issues in terms of compatibility and portability in the short and long term.

Barebone server

If you will opt for the raw installation you will need to configure your own web server in order to run a Django project, some common setups are:

To figure out which to choose, see also: deploying django

Then in your development environment:

  1. download and install Node.js and Yarn
  2. get a Python version that is compatible with the table above
  3. install and activate a database that fits your needs
  4. (optional) install Paver for developing locally

After that you can clone this repository:

cd /path/to/your/development/workspace

git clone https://github.com/g3w-suite/g3w-admin.git --single-branch --branch dev ./g3w-admin

Create and activate virtualenv within your g3w-admin local repository:

cd ./g3w-admin

python3 -m venv --system-site-packages [--prompt g3w-admin] venv
# Linux / Mac OS
source venv/bin/activate

# Windows
.\venv\Scripts\activate

Create the following configuration file from the available template:

And check that the following parameters are set accordingly:

# /g3w-admin/g3w-admin/base/settings/local_settings.py

DATASOURCE_PATH     = '<static_path_to_gis_data_source>'
MEDIA_ROOT          = '<path_to_media_root>'
SESSION_COOKIE_NAME = '<unique_session_id>'
DATABASES           = {
    'default': {
        'ENGINE': 'django.contrib.gis.db.backends.postgis',
        'NAME': '<db_name>',
        'USER': '<db_user>',
        'PASSWORD': '<db_user_password>',
        'HOST': '<db_host>',
        'PORT': '<db_port>',
    }
}

Complete installation process by download all python and javascript dependencies and finalizing the django database setup:

paver install

If you don't want to use Paver, see also: manual installation steps


How to develop

You can start the built-in development server by using the following:

paver start
paver stop

If everything went fine, you can now visit your local development server URL to see changes:

http://localhost:8000

If you don't want to use Paver, see also: run g3w-suite


Plugins

Add-on modules are released according to django's python specifications on reusable apps.

The following packages are released as core applications:

Any additional package must be placed into the /g3w-admin/g3w-admin folder.


Testing

Automated tests are performed on both latest QGIS release and current QGIS LTR (v3.28) for any push event involving the dev branch.

The Dockerfile and docker-compose.yml files used to perform these tests are:

Execution log: github.com/g3w-suite/g3w-admin/actions

More info: test_runner.yml + build_suite.sh


FAQ

1. How can I translate this project?

Translations management is a part of the Django framework, all available translations are located in the /g3w-admin/locale folder.

Depending on the component you want to translate you can start by consulting one of the following:


Contributors

Translators


Compatibile with: Django version QGIS version


License: MPL-2