Divio Cloud offers Beta support for PostGIS/GeoDjango. To activate it, you will need to be using up-to-date versions of our software.
Please contact support to enable PostGIS for your project.
Enable PostGIS in Django
Enable django.contrib.gis in the Aldryn Django Addon configuration.
Ensure that you have the requisite system libraries installed
GeoDjango requires the
GDAL library, which may or may not already be installed in your project's Docker environment (you will get a runtime error
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library if it is not).
GDAL , edit your
Dockerfile and after the
FROM section, add:
RUN apt-get update && apt-get install -y gdal-bin
Enable PostGIS locally
After completing the steps above, you need to set your local database to use the same engine as is used on the cloud platform.
docker-compose.yml file to refer to
mdillon/postgis - for example, change:
(You are advised to keep the same version number.)