Welcome to the Django Weather Dashboard project. In this project, we've built a simple and interactive web application that allows users to check the current weather in various cities around the world.
This project involves usage of Big Data from OpenWeatherMap API.
Before you get started, make sure you have the following installed:
- Python (3.6 or higher)
- Django
- Git (optional, for version control)
IMPORTANT: Remember to create two config.py files:
- Create a new file named config.py in your project directory (where settings.py is located).
E.g.
~/weather-dashboard/weather_dashboard/weather_dashboard/config.py
And in the first config.py, define the SECRET_KEY like this:
MY_SECRET_KEY = 'your-secret-key-goes-here'Replace your-secret-key-goes-here with your actual secret key.
- Create a second config.py in your app directory where the
admin.pyandapps.pyfiles located. E.g.~/weather-dashboard/weather_dashboard/weather_app/config.py
And in the second config.py, define the OpenWeatherMap API key:
# config.py
OPENWEATHERMAP_API_KEY = 'YOUR_API_KEY'Replace YOUR_API_KEY accordingly.
Add config.py into your .gitignore.
- Clone this repository to your local machine (or download it):
git clone https://github.com/yourusername/weather-dashboard.git- Change to the project directory:
cd weather-dashboard- Install the required Python packages:
pip install -r requirements.txt-
Set up your environment variables (See Project Overview).
-
Run the development server:
python manage.py runserver- Open a web browser and visit
http://localhost:8000/weather/dashboardto see your weather dashboard in action!
- Display current weather data for a user-specified city.
- Responsive and user-friendly interface.
- Error handling for invalid city names.
- User input for selecting a city to check the weather.
- Professional CSS styling for an appealing look.
- Visit the application at
http://localhost:8000/weather/dashboard. - Enter the name of the city you want to check the weather for.
- Click the "Get Weather" button.
- The dashboard will display the current temperature, humidity, and weather description for the specified city.
For a detailed guide on how to use the application and customize it, please refer to the User Guide.
- Django - The web framework used.
- OpenWeatherMap API - For fetching weather data.
- HTML, CSS, and JavaScript - For front-end development.
- weather_app: Django app containing views, templates, and settings.
- static: Static files like CSS styles.
- templates: HTML templates for rendering views.
- weather_fetcher.py: Python script for fetching weather data.
This project is ready for deployment on platforms like Heroku, PythonAnywhere, or your preferred hosting provider. For detailed deployment instructions, please refer to the Deployment Guide.
Contributions are welcome! If you have ideas for improvements or new features, please open an issue or create a pull request. For major changes, please discuss them in advance.
This project is licensed under the MIT License - see the LICENSE.md file for details.

