def index(_): """ Main route which returns all versions. """ weather = Weather() return HttpResponse(weather.to_json())
def city(_, area, region): """ Get weather by area. i.e. Austin,tx""" weather = Weather(area + ',' + region) return HttpResponse(weather.to_json())
def test_weather_json(self): weather = Weather() json = weather.to_json() self.assertIsNotNone(json)