.. -*- coding: utf-8 -*- Project cwtags ============== :creation date: 2009/10/22 a small library to help outputing html from cubicweb cubes In the spirit of using Python as a templating language, this provides convenient notations to build the html part of views in a well structured way. Version 1.1.0 ------------- :publication date: 2014/11/04 :expected date: n/a Ticket #3406647 Extend the way attributes names and values can be written ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: validation pending See the patch for details Ticket #4502759 UStringIO monkeypatch breaks assertions in write() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.500 :state: validation pending ``UStringIO.write()`` has assertions to make sure that only Unicode strings are given to it. The ways cwtags monkeypatches ``UStringIO`` has many drawbacks: * it bypasses completely the assertion in place, allowing anything to be given to ``write()``, * the monkeypatch of ``getvalue()`` worsens this by implicitely calling ``unicode()`` on the content, * the current implementation depends on the knowledge of ``UStringIO``'s implementation (namely, the fact that ``UStringIO`` inherits from ``list``) A better approach would be to call the original method from the monkeypatch (much like a ``super`` call would) to get all the benefits from the original method, while adding new handling for tag objects. Version 1.0.0 ------------- :publication date: 2013/12/20 :expected date: n/a Ticket #2971539 give a nice error message when a simple tag is used as context manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.100 :state: validation pending :: with div(id=42): # ... Yields an obscure "AttributeError: 'simpletag' object has no attribute '__exit__'" Instead, let's propose: "TypeError: Did you forget to give a callable in first position ?" Ticket #3114946 help writing data- element attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.200 :state: validation pending Since elt(data-foo=42) is not valid python syntax, let's either: * replace all _ with - * or just data_ with data- Ticket #2920260 provide all the tags once and for all ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.300 :state: validation pending as of today only a frequently used subset is provided it is a bit annoying to have to:: h4 = tag('h4') on one's app when needed .... Version 0.1.1 ------------- add missing tags :publication date: 2012/02/06 :expected date: n/a Ticket #571321 no button tag ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: bug :load: 0.100 :state: resolved Version 0.1.0 ------------- come to existence :publication date: 2009/11/04 :expected date: n/a Ticket #499834 write the code ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :type: enhancement :load: 0.500 :state: resolved