BUILDING GEOSPATIAL WEB APPLICATIONS IN PYTHON VIA DJANGO FRAMEWORK

<p>Django is a popular web framework written in Python that simplifies the development of web applications. You can check out django documentation here to get to understand the basic concepts and how it works here:</p> <h2>Django</h2> <h3>The web framework for perfectionists with deadlines.</h3> <p>docs.djangoproject.com</p> <p>For this tutorial, I will be using Atom IDE to create a simple geospatial application together with Python and the django web framework. You can access and download the application here (check their official website for newer versions):</p> <h2>Atom</h2> <h3>Download the latest version of Atom for Windows. The comprehensive text editor for programmers, created by GitHub&hellip;</h3> <p>atom.en.uptodown.com</p> <p>The link to the github repository with the whole code and data for this tutorial can be accessed at. You may clone and impliment your functionalities too:</p> <h2>GitHub - KimutaiLawrence/Geodjangoapp</h2> <h3>Contribute to KimutaiLawrence/Geodjangoapp development by creating an account on GitHub.</h3> <p>github.com</p> <p>Let us now start!</p> <p>Open your Anaconda prompt (terminal), go to where you want your project to be created and install Django ,Folium and geopandas . This will first install the necessary packages we will use. You then type &ldquo;django-admin startproject geo&rdquo;. This will then start a project by creating a &ldquo;geo&rdquo; folder with all the necessary things in it</p> <p>We then type the following command which will then create another &ldquo;geoApp&rdquo; folder with some components/ files including a &ldquo;migrations&rdquo; folder among others(In Django, migrations are a way to manage changes to your database schema over time. They allow you to evolve your database structure as you make changes to your models without manually modifying the database.):</p> <pre> python manage.py startapp geoApp</pre> <p>We then go ahead to create a new file called urls.py inside the geoApp and type the following code:</p> <pre> from django.urls import path from django.contrib.auth import views as auth_views from . import views urlpatterns = [ path(&#39;&#39;,views.home, name=&#39;home&#39;) ]</pre> <p>We then also go to the previous urls.py file in the main &lsquo;geo&rsquo; folder and add the following lines of code. Yes, there is some code in the file already provided for you( NB: This is how weregister our &ldquo;geoApp/urls.py&rdquo; inside &ldquo;geo/urls.py&rdquo;):</p> <pre> from django.contrib import admin from django.urls import path, include #added &#39;include&#39; to include our geoApp url urlpatterns = [ path(&quot;admin/&quot;, admin.site.urls), path(&#39;&#39;, include(&#39;geoApp.urls&#39;)),#this line is what we add ]</pre> <p>We then create a templates folder inside the geoApp folder called &ldquo;templates&rdquo; and another folder within the templates folder called &ldquo;geoApp&rdquo;, with where we will place our html file.</p> <p>We then go to the settings.py file, add some code and add some static files and root as follows(note: there is already some code provided within the file):</p> <p><a href="https://medium.com/@kimutai.lawrence19/building-geospatial-web-applications-in-python-via-django-framework-b44c021fb0b9">Website</a></p>