A Django-based web application that provides real-time weather data and a 3-day weather forecast for cities worldwide. The application integrates with the OpenWeatherMap API and Weather API to display accurate and up-to-date information.
- 🌍 Search by City: Enter a city name to retrieve current weather data and a detailed 3-day forecast.
- ⛅ Current Weather: Displays the temperature, feels-like temperature, humidity, wind speed, UV index, and cloudiness.
- 📅 3-Day Forecast: Shows an hourly breakdown of temperature, wind speed, humidity, and UV index for the next three days.
- 🌞 Sunrise & Sunset Times: Provides the local times for sunrise and sunset.
- ⚡ UV Index: Check the UV index for the current day and forecast days.
- Backend: Django (Python)
- Frontend: HTML, CSS (with responsive design)
- APIs: OpenWeatherMap API and Weather API
-
Clone this repository:
git clone https://github.com/yumeangelica/online-weather-view.git
-
Navigate to the project directory:
cd online-weather-view
-
Install the required dependencies:
pip install -r requirements.txt
-
Get your API keys:
- Sign up at OpenWeatherMap and Weather API to obtain API keys.
- Create a
.env
file:touch .env
- Add the following content to the
.env
file:OWM_API_KEY=your_openweathermap_api_key UV_API_KEY=your_weather_api_key
-
Run database migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Open your web browser and visit:
http://127.0.0.1:8000
- Search: Type the name of any city.
- Select an Option: Choose between current weather or 3-day forecast.
- View Weather Data: See real-time weather data or a detailed forecast.
This project is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. For more information, see the LICENSE file in this repository.