尝试创建一个带有“城市/位置”的菜单,其中包含“社区”的子菜单。Hood.objects.filter(switch=1, restaurants__city_id=8).distinct().order_by('name')Template.html {% for location in getlocs %}
<li>{{ location
我正在尝试显示某个国家的城市名称{{city}}。例如,如果我点击“美国”,它应该会显示我的数据库中的城市列表。我试过了,但是什么也没有显示出来。Post.objects.filter(country='country').filter(city='city') return render(request, 'users/cities.html', context){% for post