[pygeoapi] Django example

Tom Kralidis tomkralidis at gmail.com
Sat Mar 23 04:13:12 PDT 2024


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> 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
> https://lists.osgeo.org/mailman/listinfo/pygeoapi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pygeoapi/attachments/20240323/591ad8ac/attachment.htm>


More information about the pygeoapi mailing list