cubicweb/utils.py
changeset 12508 a8c1ea390400
parent 12327 58f05ffafeca
child 12542 85194bd49119
equal deleted inserted replaced
12507:211472ab15c8 12508:a8c1ea390400
    40 from logging import getLogger
    40 from logging import getLogger
    41 
    41 
    42 from six import text_type
    42 from six import text_type
    43 
    43 
    44 from logilab.mtconverter import xml_escape
    44 from logilab.mtconverter import xml_escape
    45 from logilab.common.deprecation import deprecated
       
    46 from logilab.common.date import ustrftime
    45 from logilab.common.date import ustrftime
    47 
    46 
    48 from cubicweb import Binary
    47 from cubicweb import Binary
    49 
    48 
    50 
    49 
   440         self.doctype = u''
   439         self.doctype = u''
   441         self._htmlattrs = [('lang', req.lang)]
   440         self._htmlattrs = [('lang', req.lang)]
   442         # keep main_stream's reference on req for easier text/html demoting
   441         # keep main_stream's reference on req for easier text/html demoting
   443         req.main_stream = self
   442         req.main_stream = self
   444 
   443 
   445     @deprecated('[3.17] there are no namespaces in html, xhtml is not served any longer')
       
   446     def add_namespace(self, prefix, uri):
       
   447         pass
       
   448 
       
   449     @deprecated('[3.17] there are no namespaces in html, xhtml is not served any longer')
       
   450     def set_namespaces(self, namespaces):
       
   451         pass
       
   452 
       
   453     def add_htmlattr(self, attrname, attrvalue):
   444     def add_htmlattr(self, attrname, attrvalue):
   454         self._htmlattrs.append( (attrname, attrvalue) )
   445         self._htmlattrs.append( (attrname, attrvalue) )
   455 
   446 
   456     def set_htmlattrs(self, attrs):
   447     def set_htmlattrs(self, attrs):
   457         self._htmlattrs = attrs
   448         self._htmlattrs = attrs