Building an emergency location sharing app in Django (part - 2)
Building the App...
In this article we will build a basic template of the application and will see how to get the current location of the user.
Step-1 : Creating an App
Step-2 : Building a HomePage
So, let's start...
1 . Creating an App
Let's create an app in our django project
python3 manage.py startapp <appName>
Now the directory structure looks like this :
To consider the app created in our project, we need to specify the <appName> in INSTALLED_APPS in settings.py of the project.
Here, the <appName> is emergencyApp.
We are importing include from django.urls and adding a new URL pattern with path ‘home/’ means that we are creating something like http://127.0.0.1:8000/home.In include you need to mention the '<appName>.urls'.
Comments
Post a Comment