23.机构模块——机构列表页的模板页面展示

#orgs/urls.py   
url(r'^org_list/$',org_list,name=org_list),

#orgs/views.py
from django.shortcuts import render
from .models import OrgInfo,TeacherInfo,CityInfo
# Create your views here.

def org_list(request):
    all_orgs = OrgInfo.objects.all()
    #all_citys = CityInfo.objects.all()
    return render(request,'org-list.html',{
        'all_orgs':all_orgs
    })

 

猜你喜欢

转载自blog.csdn.net/qq_36227329/article/details/89399898
今日推荐