web/views/embedding.py
changeset 5715 2c3e83817a8e
parent 5556 9ab2b4c74baf
child 5890 141b935a38fc
equal deleted inserted replaced
5714:04a8e48f10bc 5715:2c3e83817a8e
    92                                            headers, req.form.get('custom_css'))
    92                                            headers, req.form.get('custom_css'))
    93                 body = soup2xhtml(body, self._cw.encoding)
    93                 body = soup2xhtml(body, self._cw.encoding)
    94             except HTTPError, err:
    94             except HTTPError, err:
    95                 body = '<h2>%s</h2><h3>%s</h3>' % (
    95                 body = '<h2>%s</h2><h3>%s</h3>' % (
    96                     _('error while embedding page'), err)
    96                     _('error while embedding page'), err)
    97         self.process_rql(req.form.get('rql'))
    97         rset = self.process_rql()
    98         return self._cw.vreg['views'].main_template(req, self.template,
    98         return self._cw.vreg['views'].main_template(req, self.template,
    99                                                 rset=self.cw_rset, body=body)
    99                                                     rset=rset, body=body)
   100 
   100 
   101 
   101 
   102 def entity_has_embedable_url(entity):
   102 def entity_has_embedable_url(entity):
   103     """return 1 if the entity provides an allowed embedable url"""
   103     """return 1 if the entity provides an allowed embedable url"""
   104     url = entity.cw_adapt_to('IEmbedable').embeded_url()
   104     url = entity.cw_adapt_to('IEmbedable').embeded_url()