A simple web application built with Django that provides current weather information for any city and displays a background image related to that city.
- Fetches real-time weather data from OpenWeatherMap API.
- Displays weather information such as temperature, humidity, and pressure.
- Integrates with Unsplash API to show a relevant background image based on the city's name.
- Django: Web framework for building the application.
- HTML/CSS: For front-end structure and styling.
- JavaScript: (optional for future enhancements).
- APIs:
- OpenWeatherMap for weather data.
- Unsplash for background images.
- Python 3.x
- pip (Python package manager)
- Django (install via pip)
- Access to OpenWeatherMap and Unsplash API keys
- Clone the repository:
git clone https://github.com/Pratiksha-287/weather-detector.git cd weather-detector
- Create a virtual environment:
python -m venv env
- Activate the virtual environment:
- on window:
.\env\Scripts\activate
- On macOS/Linux:
source env/bin/activate
- on window:
- Install the required packages:
pip install -r requirements.txt
- Start the development server:
python manage.py runserver
- Open your browser and go to http://127.0.0.1:8000/
- Enter a city name in the input field and click "Search"
- The application will display the current weather data along with a background image related to that city.
If you want to contribute to this project, please fork the repository and create a new branch for your feature or bug fix. Then, submit a pull request for review.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- OpenWeatherMap for providing weather data.
- Unsplash for offering high-quality images.
- Django community for their continuous support and documentation.
For any inquiries, feel free to reach out to me:
- Email: pratikshasingh923@gmail.com