This is a Django-based web application that allows users to get current weather information for a specified city. The weather data is fetched from the OpenWeatherMap API.
- Search for current weather information by city name.
- Display weather details including temperature, humidity, description, wind speed, visibility, sunrise, and sunset times.
- Maintain a search history of the last 10 city searches.
- Python 3.x
- Django 4.x
- An API key from OpenWeatherMap
-
Clone the repository:
git clone https://github.com/TaffCodes/django_weather_app.git cd django_weather_app
-
Create and activate a virtual environment:
venv\Scripts\activate # On Windows # source venv/bin/activate # On macOS/Linux
-
Install the required packages:
pip install -r requirements.txt
-
Set up the database:
python manage.py migrate
-
Get an API key from OpenWeatherMap by signing up at OpenWeatherMap.
** For now, you can use the API key provided in the settings.py file. **
-
Configure the API key:
- Open settings.py and add your OpenWeatherMap API key.
-
Run the development server:
python manage.py runserver
-
Access the application:
Open the web browser and go to [http://127.0.0.1:8000/
- This project was built using the Django web framework.
- Weather data is provided by OpenWeatherMap.
This project is licensed under the MIT License.