Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion clients/weather/weatherstack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ def get_weather(city):
response = requests.get(
'http://api.weatherstack.com/current',
params={
'access_key': access_key,
'query': city,
'units': 's',
}
)
temperature = response.json()['current']['temperature']

return models.Weather(temperature=273.15)
return models.Weather(temperature=temperature)
2 changes: 1 addition & 1 deletion weather/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.http import HttpResponse

import clients.weather.open_weather_map as weather
import clients.weather.weatherstack as weather


def index(request):
Expand Down