def __getitem__(self, pk): site = get_site_by_pk(self.request.db_session, pk) if site: site.__parent__ = self site.__name__ = pk return site
def sites_details_view(request): site = get_site_by_pk( request.db_session, request.matchdict['site_pk'] ) return { 'site': site }
def sites_details_view(request): site = get_site_by_pk(request.db_session, request.matchdict['site_pk']) return {'site': site}