Weather Report is a python project to fetch the current weather data and forecast weather data from Open Weather Map and to display its various parameters.
- Initial Setup
mkdir Project
cd Project
virtualenv --no-site-packages .
source bin/activate
- Clone the repository
git clone https://github.com/priyankajain18/weather_report.git
cd weather_report/
pip install -r requirements.txt
- Database setup
settings.py
------------
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': database_name,
'USER': user,
'PASSWORD': password,
'HOST': 'localhost',
'PORT': '3306',
}
}
mysql -uuser -ppassword -h localhost database_name < weather.sql
- Set SECRET_KEY
SECRET_KEY = your_secret_key
- Set API_KEY
API_KEY = your_api_key
- Collect static files
python manage.py collectstatic
- Start server
python manage.py runserver
Access http://127.0.0.1:8000/weather-report/
- Live
http://weather-forecast-report.herokuapp.com/weather-report/