Skip to content

aqibcs/django-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌤️ Django Weather App

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.

Weather App Preview

🚀 Features

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.


🛠️ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/aqibcs/django-weather-app.git
cd django-weather-app

2️⃣ Create a Virtual Environment

python -m venv venv
source venv/bin/activate  # On Windows use: venv\Scripts\activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Set Up Environment Variables

Create 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

5️⃣ Apply Migrations

python manage.py migrate

6️⃣ Run the Development Server

python manage.py runserver

Access the app at http://127.0.0.1:8000/


🚀 Deployment on Vercel

  1. Install Vercel CLI:
    npm install -g vercel
  2. Log in to Vercel:
    vercel login
  3. Deploy the App:
    vercel

👨‍💻 Developed by Aqib Shah

About

A simple Django app that fetches real-time weather data from OpenWeatherMap API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors