WebHelpers 1.0b2 is released.
Feedgenerator is updated to the current Django original, and the
GeoRSS classes added. Please test it with your newsfeeds, including
those using the 'published' property. (The 'generator' and 'source'
properties are still disabled until somebody can tell me what exactly
they should be.)
I'm not sure about one aspect of the GeoRSS code. It's putting the
longitude first in the XML file, and I've heard contradictory things
about whether it should. Does anybody have Justin Bronn's email
address, the author of the Django GIS code? I emailed Jacob but he's
out of town.
The other biggest change is in the HTML tag builder implementation.
It passes the tests and works with my site, but let me know if you
have any problems.
The deprecation of webhelpers.markdown has been canceled. The other
changes to markdown() to make it work with other Markdown
implementations remain.
Here's the full changelog since 0.6.4:
1.0b2 (2009-12-21)
------------------
* webhelpers.constants:
- Fix spelling of Massachusetts.
* webhelpers.feedgenerator:
- Sync with Django rev 11910. This adds GeoRSS and makes the API more
extensible, as well as fixing a few bugs.
(Re-added the Atom1 'published' property.)
(The 'generator' and 'source' properties were lost, but they weren't
working correctly anyway.)
GeoRSS usage: use the Geo\* classes and add ``geometry=(lat, lon)`` to
each news item. Other shapes and a (not yet implemented) Geometry class are
allowed; see the source.
Note: you should specify the latitude first, but the longitude appears
first in the newsfeed. This is a feature, to comply with the spec.
* webhelpers.html:
- New ``HTML.cdata()`` method for producing "<!![CDATA[ ... ]]>" sections.
- The basic tag builders (``HTML.a()`` and ``HTML.tag("a")``) now have a
``_nl`` arg which, if true, inserts a newline between content elements
and at the end of the tag for readability. Example:
HTML.a("A", "B", href="/") => '<a href="/">AB</a>'
HTML.a("A", "B", href="/", _nl=True) => '<a href="/">\nA\nB\n</a>\n'
This does not affect HTML attributes nor the higher-level tag helpers.
The exact spacing is subject to change. The tag building code has been
refactored to accommodate this.
* webhelpers.html.tags:
- ``form()`` puts its hidden "_method" field in a '<div style="display:none">'
to conform to XHTML syntax. The style prevents the div from being displayed
or affecting the layout. A new arg ``hidden_fields`` may be a dict or
iterable of additional hidden fields, which will be added to the div.
- Set magic ID attribute in ``hidden`` helper to match behavior of the other
tag helpers.
- ``image()`` can now calculate the width and height automatically
from an image file, using either the PIL algorithm or the pure Python
algorithm in ``webhelpers.media``. It also logs the dimensions to the
debug log for troubleshooting.
* webhelpers.html.tools:
- Reimplement ``highlight()`` using the HTML builder. New arguments add
flexibility. Deprecate the ``highlighter`` argument, which creates tags
via string interpolation.
- Fixed ``auto_link()`` to parse slash characters in query string.
Patch by hanula; Bitbucket issue #10.
- Fix HTML overescaping and underescaping in auto_link(). Patch by Marius
Gedminas. A parsing bug remains:
http://pylonshq.com/project/pylonshq/ticket/657
* webhelpers.markdown / webhelpers.html.converters:
- ``webhelpers.markdown`` will not be upgraded to the version 2 series but
will remain at 1.7. Users who want the latest bugfixes and extensions
should download the full Markdown package or the alternative Markdown2
from PyPI.
- The ``markdown()`` helper in
``webhelpers.html.converters`` now has support for external Markdown
implementations. You can pass a specific module via the ``markdown``
argument, otherwise it will attempt to import ``markdown`` or fall back
to ``webhelpers.markdown``.
- To see which version is autoloaded,
call ``_get_markdown_module()`` and inspect the ``.__file__``,
``.version``, and/or ``.version_info`` attributes of the return value.
* webhelpers.media:
- Bugfix in ``get_dimensions_pil``.
* webhelpers.paginate:
- Change for SQLAlchemy 0.6. (bug #11)
* webhelpers.pylonslib:
- Fix HTML overescaping. Patch by Marius Gedminas.
1.0b1 (2009-11-20)
------------------
* Delete deprecated subpackage: rails.
These are replaced by new helpers in date, html, misc, number, text.
* Delete other deprecated subpackages: commands, hinclude, htmlgen, pagination.
Pagination is replaced by paginate.
* webhelpers.constants:
- ``uk_counties`` returns tuples rather than lists.
* webhelpers.feedgenerator:
- ``rfc3339_date`` now accepts date objects without crashing.
- Add 'generator' and 'source' properties to RSS2 feeds. Patch by
Vince Spicer.
- Add 'published' property to Atom1 feeds.
* webhelpers.html.converters:
- New helper ``render()`` formats HTML to text.
- New helper ``sanitize()`` strips HTML tags from user input.
* webhelprs.html.tags:
- New helper ``css_classes()`` to add classes to a tag programmatically.
- Fix bug in tag helpers when passing 'id_' argument (although 'id' is
recommended instead).
- Add OptionGroup class and optgroup support to select(). Patch by
Alexandre Bourget.
* webhelpers.html.tools:
- New helper ``strip_tags()`` deletes HTML tags in a string.
* webhelpers.paginate:
- Allow all versions of SQLAlchemy > 0.3.
- convert "_range" and "_pagelink" function to Page class method so that they
can be overridden
- pager "onclick" argument use template string value. So, javascript code can
use "partial_url" or "page" value or any. Backward compatibility is
considered.
- Add presliced list option to avoid slicing when list is already.
* webhelpers.pylonslib:
- is now a package.
- The ``Flash`` class now accepts severity categories, thanks to Wichert
Akkerman. The docstring shows how to set up auto-fading messages using
Javascript a la Mac OSX's "Growl" feature. This is backward compatible
although you should delete existing sessions when upgrading from 0.6.x.
- ``webhelpers.pylonslib.minify`` contains enhanced versions of
``javascript_link`` and ``stylesheet_link`` to minify (shrink) files for
more efficient transmission. (EXPERIMENTAL: tests fail in
unfinished/disabled_test_pylonslib_minify.py; see
http://pylonshq.com/project/pylonshq/ticket/466 .)
* webhelpers.text:
- Port several helpers from Ruby's "stringex" package.
+ ``urlify()`` converts any string to a URL-friendly equivalent.
+ ``remove_formatting()``
+ If the ``unidecode`` package is installed, these two helpers will also
transliterate non-ASCII characters to their closest pronounciation
equvivalent in ASCII.
+ Four other helpers reduce HTML entities or whitespace.
--
Mike Orr <[email protected]>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.