The project idea was to extract nearby location of Mr. X phone call request. We may assume that, Mr. X sent a request from a website for emergency support. So, If he allowed the location service for the website then we can extract his present location coordinates by the help of HTML5 Geolocation service. And, If he didn't allow the location service we can get the location coordinates by the request IP address. After then, we can get his address information by using Location API.
- Goto the directory where you want to store your project.
- Clone the git repository to the project directory.
- Open the terminal and navigate to the project directory from the terminal.
- Create virtual environment from the terminal by typing
virtualenv .env
and activate it by typingsource .env/bin/activate
(for Linux), '.env\Scripts\activate'(for Windows).- If you don't have
virtualenv
installed then install it by typingpip install virtualenv
.
- If you don't have
- Install the project dependencies by typing
pip install -r requirements.txt
on the terminal. - Create
config.local.json
file with the same content ofconfig.json
file. - Migrate the database by typing
python manage.py makemigrations
and thenpython manage.py migrate
on the terminal. - Create admin user if you want by typing
python manage.py createsuperuser
and give the required credentials on the terminal. - Now, Run the project from your localhost by typing
python manage.py runserver
- Navigate to the URL 127.0.0.1:8000 from your browser.
- Click the HELP ME! button to get the address.
- You can terminate the server anytime by CTRL+c.
- /
- /help-me/
- /api/v1/seekers/
- For IP Address: https://www.ipify.org/
- For Location Coordinates: https://ipapi.co/
- For Location Details: https://opencagedata.com/api
N.B. : For better accuracy and in search of street address I have used 3 API's. We can use less if we want.