A simple Django-based weather application that fetches real-time weather data and a 4-day forecast using the OpenWeather API. The app allows users to search for weather conditions by city name or use their current location.
✅ Search by City – Enter a city name to fetch weather data.
✅ Geolocation Support – Get weather updates based on your current location.
✅ Real-Time Weather Data – Displays temperature, humidity, wind speed, pressure, and weather conditions.
✅ 4-Day Forecast – Provides an upcoming weather forecast with icons and detailed conditions.
✅ Modern UI – Responsive and clean design with CSS.
✅ Deployed on Vercel – Accessible online via: Django Weather App.
git clone https://github.com/aqibcs/django-weather-app.git
cd django-weather-apppython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtCreate a .env file in the project root and add:
OPENWEATHER_API_KEY=your_openweather_api_key
DJANGO_SECRET_KEY=your_django_secret_key
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
POSTGRES_DB=your_db_name
POSTGRES_USER=your_db_user
POSTGRES_PASSWORD=your_db_password
DB_HOST=your_db_host
PGPORT=your_db_port
python manage.py migratepython manage.py runserverAccess the app at http://127.0.0.1:8000/
- Install Vercel CLI:
npm install -g vercel
- Log in to Vercel:
vercel login
- Deploy the App:
vercel
