示例#1
0
    def __getitem__(self, pk):
        site = get_site_by_pk(self.request.db_session, pk)

        if site:
            site.__parent__ = self
            site.__name__ = pk

        return site
示例#2
0
def sites_details_view(request):
    site = get_site_by_pk(
        request.db_session,
        request.matchdict['site_pk']
    )

    return {
        'site': site
    }
示例#3
0
def sites_details_view(request):
    site = get_site_by_pk(request.db_session, request.matchdict['site_pk'])

    return {'site': site}