ClimaVibe is a Django-based weather application that provides real-time weather information for predefined cities as well as any city entered by the user. The app uses the OpenWeather API to fetch weather data such as temperature, weather description, and corresponding weather icons.
Clone the Repository:
git clone https://github.com/Himel-Sarder/ClimaVibe-WeatherApp-Django.git
Install Dependencies:
Ensure you have Python and Django installed. You can install the required packages using pip
:
pip install django requests
Set Up the OpenWeather API Key:
.env
file in the root directory.OPENWEATHER_API_KEY=your_api_key_here
Migrate Database:
python manage.py migrate
Create Superuser (for admin panel access):
python manage.py createsuperuser
Run the Server:
python manage.py runserver
Access the Application: Open your web browser and go to:
http://127.0.0.1:8000/
The admin panel allows you to manage predefined cities for which the weather data is displayed on the homepage.
Access the Admin Panel:
http://127.0.0.1:8000/admin/
Use the superuser credentials created during setup.
Add/Remove Predefined Cities:
Predefined Cities
section in the admin panel.Adding More Predefined Cities:
predefined_cities
list in the index
view.Styling:
index.html
and the custom styles in the style
tag.Feel free to fork this repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.