def get_cities(request):
'''
Returns all the weather stations in database
'''
weather_stations = WeatherStation.objects.all()
serialized_data = serialize_weather_stations(weather_stations)
return HttpResponse(json.dumps(serialized_data),
content_type="application/json")
评论列表
文章目录