This is a Django project for creating a weather forecast application. Follow the instructions below to get started.
- Python 3.x installed on your system
- Pip package manager
- Clone the repository to your local machine:
git clone https://github.com/ahabalikhan/weather-forecast-django.git
- Navigate to the project directory:
cd weather-forecast-django
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
-
For Windows:
venv\Scripts\activate
-
For macOS/Linux:
source venv/bin/activate
- Install the project dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root directory and add the following environment variables:
OPEN_WEATHER_API_KEY=your_weather_api_key
Replace your_weather_api_key
with your actual API key for accessing the weather forecast data.
To start the Django development server, run the following command:
python manage.py runserver
You can now access the application by visiting http://localhost:8000/map/
in your web browser.
The main API consumed in this project is http://localhost:8000/weather/