2024-05-11 07:30:26 发布
网友
def Home(request):#django if request.method == 'POST': city = request.POST.get('search') print(city) URL = f'http://api.openweathermap.org/data/2.5/weather?q={city}
将变量设置在if之前:
def Home(request):#django city = '' if request.method == 'POST': city = request.POST.get('search') print(city) URL = f'http://api.openweathermap.org/data/2.5/weather?q={city}
将变量设置在if之前:
相关问题 更多 >
编程相关推荐