Demo Application

Learn to integrate the OpenWeatherMap APIs in a simple Django weather application.

In this lesson, we’ll look at a simple weather application built using Bootstrap and OpenWeatherMap APIs with Django. This application provides current weather information, daily weather forecasts for a period of 5 days with data updates after every 3 hours, and the current air pollution data for a location of our choice.

Run the application

Step 1: Click the “Run” button to start the application. Click the URL next to “Your app can be found at:” in the widget below to open the application in a new tab.

Step 2: Once the server starts, you’ll see a homepage with a search bar. Enter either the city name only or the city name followed by the state and country codes, separated by commas.

Note: Searching by states is available for USA locations only.

Step 3: After entering the location in the search bar, press “Enter” or click the search icon.

Step 4: You’ll now see two tabs—one for “5-Day / 3-Hour Forecasts” and the other for “Air Pollution.” Switch between tabs to check out the corresponding weather data.

Application code

Get hands-on with 1400+ tech skills courses.