<div dir="ltr"><div>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.</div><div><br></div><div>In addition, we do have a Django example in [1], which may help.<br></div><div><br></div><div>Hope this helps.</div><div><br></div><div>..Tom<br></div><div><br></div><div>[1] <a href="https://github.com/geopython/pygeoapi-examples/tree/main/django/sample_project">https://github.com/geopython/pygeoapi-examples/tree/main/django/sample_project</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 18, 2024 at 10:30 PM Ivan Lucena via pygeoapi <<a href="mailto:pygeoapi@lists.osgeo.org">pygeoapi@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg7917322612546106906">




<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi folks,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
My name is Ivan, I'm an ex OSGeo maintainer and GDAL contributor, now working as FOSS user.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have a django project on the backend and a React frontend using OpenLayers.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
The django project implements REST API and communicates with GEE, and is deployed on MS IIS.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I setup a MVT using pygeoapi and that is working really fine on development, using "pygeoapi serve".</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I thought I could integrate pygeoapi with my django backend would simplify my deployment. But that is not working well.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Since version 0.15.0, there is no more django example project, and the code is incompatible with newer version.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
It seems like the pygeoapi django code is not abandoned, so where can we find the code of a running example?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Or do you have any other good advice? Like "forget django", deploy some other way.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thank you so very much. I appreciate your work.</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Ivan</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
</div>

_______________________________________________<br>
pygeoapi mailing list<br>
<a href="mailto:pygeoapi@lists.osgeo.org" target="_blank">pygeoapi@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/pygeoapi" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/pygeoapi</a><br>
</div></blockquote></div>