所谓三级联动就是,一层接着一层,根据上一层的选择给出这一层的结果
如选择市之后,会给出相应的区,然后到相应的县这就是联动
from django.core import serializers def showMenuInfo(request): pid = request.GET.get('pid',-1) pid = int(pid) areaList = Area.objects.filter(parentid=pid) jAreaList = serializers.serialize('json',areaList) return JsonResponse({'areaList':jAreaList})
配置模板页面
Title