[pygeoapi] Django example

Ivan Lucena ivan.lucena at outlook.com
Mon Apr 1 17:18:53 PDT 2024


Hi Tom.

Thank you for your feedback.

Good to know that there are recent updates. When do you think they are going to be available for pip/conda installers?

Thank you for updating with the demo link.

Unfortunately, it seems like the demo is not compactible with pygeoapi 0.16.1. Like I mentioned before. There are a lot more changes to be made on "settings.py" to make it at least "compile". I could send you an update, if you want.

Thanks again,

Ivan


________________________________
From: Tom Kralidis <tomkralidis at gmail.com>
Sent: Saturday, March 23, 2024 7:13 AM
To: Ivan Lucena <ivan.lucena at outlook.com>
Cc: pygeoapi at lists.osgeo.org <pygeoapi at lists.osgeo.org>
Subject: Re: [pygeoapi] Django example

Hi Ivan: thanks for the info and feedback.  There were recent updates to Django endpoints for Tiles support in the last week in the main branch of development.

In addition, we do have a Django example in [1], which may help.

Hope this helps.

..Tom

[1] https://github.com/geopython/pygeoapi-examples/tree/main/django/sample_project

On Mon, Mar 18, 2024 at 10:30 PM Ivan Lucena via pygeoapi <pygeoapi at lists.osgeo.org<mailto:pygeoapi at lists.osgeo.org>> wrote:
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





_______________________________________________
pygeoapi mailing list
pygeoapi at lists.osgeo.org<mailto:pygeoapi at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/pygeoapi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pygeoapi/attachments/20240402/634cf687/attachment.htm>


More information about the pygeoapi mailing list