示例#1
0
文件: views.py 项目: Nudin/techism
def tag(request, tag_name):
    tag = get_object_or_404(OrganizationTag, name=tag_name)
    org_list = organization_service.get_by_tag(tag)
    tags = organization_service.get_tags()
    return render_to_response(
        'organizations/index.html', 
        {
            'organization_list': org_list, 
            'tags': tags, 
            'tag_name': tag_name
        }, 
        context_instance=RequestContext(request))
示例#2
0
文件: views.py 项目: Nudin/techism
def index(request):
    org_list = organization_service.get_all()
    tags = organization_service.get_tags()
    page = __get_paginator_page(request, org_list)
    if page == -1:
        return HttpResponseNotFound()
    return render_to_response(
        'organizations/index.html',
        {
         'organization_list': page,
         'tags': tags
        }, 
        context_instance=RequestContext(request))
示例#3
0
文件: sitemaps.py 项目: Nudin/techism
 def items(self):
     return organization_service.get_tags()