This is a weather app in Django, it shows current weathers in multiple cities. You can add cities of your choice and can delete existing cities.I used Python Requests to call the Open Weather Map API.
To run this project, you should first Sign Up to Open Weather Map
- Clone or Download the project.
- If you download the ZIP file then unzip it first.
- Now go to Open Weather Map --> sign in through your account --> go to API keys and copy the key.
- Open the Weather-App-master folder--> Open WeatherApp folder.
- Open weather folder and then open views.py file in any text editor.
- In views.py the line number 20 is --> url = 'http://api.openweathermap.org/data/2.5/weather?q={}&units=metric&appid=EnterYourAPIKey' in place of EnterYourAPIKey paste your API key.
- Save the views.py file.
- Go to WeatherApp folder and copy the location of it.
- Open Command Prompt if you are working on Windows or Terminal if you are working on Linux or Mac
- Change working directory to WeatherApp using cd command as --> cd CTRL+V
- Now type python manage.py runserver, this will start the local web server.
- In your web browser enter the address : http://localhost:8000 or http://127.0.0.1:8000/
- The project is run successfully, now you can add city of which you wants to check weather and also can remove existing cities.
The Secret_Key required for the execution and debugging of project is not removed from the project code. So you can use the project as your college mini-project or by using the project code you can build your own project.