Skip to content

☔️ Weather app in Django that gets the current weather for multiple cities. To do this, I used Python Requests to call the Open Weather Map API.

Notifications You must be signed in to change notification settings

thedvlprs/django-weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather app in Django using Python Requests

Weather app in Django that gets the current weather for multiple cities. To do this, I used Python Requests to call the Open Weather Map API.

License: MIT GitHub contributors Open Source Love png1 saythanks

forthebadge made-with-python

ForTheBadge built-with-love

Demo

Building

Note: In this project I've used Python 3.7, so you need to install it first. It's highly recommended to use pyenv for installation (if you're on MacOS).

It's best to use the python pipenv tool to build locally:

$ pipenv --python python3

$ pipenv shell

$ pipenv install django requests autopep8

Start the project

$ django-admin startproject the_weather

$ cd the_weather/

$ python manage.py startapp weather

Open up the files in your editor and add app weather to the project within the_weather/settings.py:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'weather',
]

$ python manage.py migrate

$ python manage.py createsuperuser --username=<your name> --email=<your email address>

And then just startapp the app:

$ python manage.py runserver

Open http://localhost:8000 to view it in the browser and go to admin panel http://localhost:8000/admin/

The page will NOT reload if you make any edits.

Subscribe for free OpenWeather API

Ypu can get your API from OpenWeather

Learn More

To learn more on Django web framework visit Django.

Write your first Django app, check out the Writing your first Django app, part 1.

Creating a Weather App in Django Using Python Requests, check out this YouTube Tutorial Creating a Weather App in Django Using Python Requests.

About

☔️ Weather app in Django that gets the current weather for multiple cities. To do this, I used Python Requests to call the Open Weather Map API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published