[pygeoapi] Django example

Ivan Lucena ivan.lucena at outlook.com
Mon Mar 18 19:30:48 PDT 2024


Hi folks,

My name is Ivan, I'm an ex OSGeo maintainer and GDAL contributor, now working as FOSS user.

I have a django project on the backend and a React frontend using OpenLayers.

The django project implements REST API and communicates with GEE, and is deployed on MS IIS.

I setup a MVT using pygeoapi and that is working really fine on development, using "pygeoapi serve".

I thought I could integrate pygeoapi with my django backend would simplify my deployment. But that is not working well.

First of all, looking at the pygeoapi doc, I don't see the point of running "pygeoapi serve --django". I can't change any setting by doing it. So, there is no permission to access the service from the frontend app.

Since version 0.15.0, there is no more django example project, and the code is incompatible with newer version.

If anyone tries to follow the instructions, it will fail. But I figured that by coping some code from the current (0.16.1) "pygeoapi/django_/settings.py" (0.16.1) into my django project "settings.py" seems to fix the errors.

Now, I can run "python manger.py runserver" and both my backend and pygeoapi runs from that. Exactly how I imagined that it would work on my deployment.

But the front end doesn't access the tiles as it does so well when it runs on development server with "pygeoapi serve" (no --django). Lots of 404 errors.

It seems like the pygeoapi django code is not abandoned, so where can we find the code of a running example?

Or do you have any other good advice? Like "forget django", deploy some other way.

Thank you so very much. I appreciate your work.

Best regards,

Ivan





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pygeoapi/attachments/20240319/364b867a/attachment.htm>


More information about the pygeoapi mailing list