コード例 #1
0
ファイル: site.py プロジェクト: josemanuelgp/annalist
 def get(self, request):
     """
     Create a rendering of the current site home page, containing (among other things)
     a list of defined collections.
     """
     viewinfo = DisplayInfo(self, "view")
     viewinfo.get_site_info(self.get_request_host())
     viewinfo.check_authorization("view")
     if viewinfo.http_response:
         return viewinfo.http_response
     resultdata = viewinfo.sitedata
     resultdata.update(viewinfo.context_data())
     # log.info("SiteView.get: site_data %r"%(self.site_data()))
     return (self.check_site_data()
             or self.render_html(resultdata, 'annalist_site.html')
             or self.error(self.error406values()))
コード例 #2
0
ファイル: site.py プロジェクト: rklyne/annalist
 def get(self, request):
     """
     Create a rendering of the current site home page, containing (among other things)
     a list of defined collections.
     """
     viewinfo = DisplayInfo(self, "view", {}, None)  # No continuation
     viewinfo.get_site_info(self.get_request_host())
     viewinfo.get_coll_info(layout.SITEDATA_ID)
     viewinfo.get_request_type_info(entitytypeinfo.COLL_ID)
     viewinfo.check_authorization("view")
     if viewinfo.http_response:
         return viewinfo.http_response
     self.help_markdown = viewinfo.collection.get(RDFS.CURIE.comment, None)
     resultdata = viewinfo.sitedata
     resultdata.update(viewinfo.context_data())
     # log.info("SiteView.get: site_data %r"%(self.site_data()))
     return (self.check_site_data()
             or self.render_html(resultdata, 'annalist_site.html')
             or self.error(self.error406values()))
コード例 #3
0
ファイル: site.py プロジェクト: juandesant/annalist
 def get(self, request):
     """
     Create a rendering of the current site home page, containing (among other things)
     a list of defined collections.
     """
     viewinfo = DisplayInfo(self, "view", {}, None)    # No continuation
     viewinfo.get_site_info(self.get_request_host())
     viewinfo.get_coll_info(layout.SITEDATA_ID)
     viewinfo.get_type_info(entitytypeinfo.COLL_ID)
     viewinfo.check_authorization("view")
     if viewinfo.http_response:
         return viewinfo.http_response
     self.help_markdown = viewinfo.collection.get(RDFS.CURIE.comment, None)
     resultdata = viewinfo.sitedata
     resultdata.update(viewinfo.context_data())
     # log.info("SiteView.get: site_data %r"%(self.site_data()))
     return (
         self.check_site_data() or
         self.render_html(resultdata, 'annalist_site.html') or 
         self.error(self.error406values())
         )