Webhelpers

Latest version: v1.3

Safety actively analyzes 682244 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

1.0b7

------------------

* webhelpers.containers:

- Bugfix in ``canada_provinces``, reported by rpetrello.

* webhelpers.html.grid / webhelpers.pylonslib.grid:

- Updates by Ergo, mainly styling and CSS classes.
- Rename classes: ObjectGrid, PylonsGrid, PylonsObjectGrid.

* webhelpers.paginate:

- New URL generation algorithm for ``Page.pager()``. You can pass a callback
function to the constructor, or it will fall back to ``pylons.url.current``
or ``routes.url_for`` (in that order). It will raise ``NotImplementedError`` if
none of these are available.
- Don't allow extra positional args in constructor. The implementation does
nothing with them, so it shouldn't allow them.
- Import ``sqlalchemy.orm`` as well as ``sqlalchemy``. User Sybiam reports an
error otherwise.
- Add code to work with other iterable containers, contributed by Marcin
Kuzminski.

* webhelpers.pylonslib.flash:

- New argument ``ignore_duplicate`` to prevent adding the same message
multiple times.

1.0b6

------------------

* webhelpers.containers / webhelpers.misc:

- ``NotGiven`` moved to webhelpers.misc.

* webhelpers.html.grid / webhelpers.pylonslib.grid:

- Updates by Ergo, including SQLAlchemy object grid classes.

* webhelpers.misc:

- New function ``deprecate``.

* webhelpers.number:

- New functions ``format_data_size``, ``format_byte_size``, and
``format_bit_size`` for displaying numbers in SI units
("1.2 kilobytes", "1.2 kB", "1.0 KiB"). Contributed by
Wojciech Malinowski.

1.0b5

------------------

* webhelpers.html.converters:

- Re-add import of ``render`` and ``sanitize`` from
``webhelpers.html.render``. That module is not public.

* webhelpers.misc:

- New exception ``OverwriteError``.
- Add ``exclude`` argument to ``subclasses_only``.

* webhelpers.text:

- Disable ``convert_misc_characters``: it fails its doctests and there's
no consensus on what it should do.

* "number_to_human_size.py" is in unfinished directory. This is an old rails
helper from WebHelpers 0.6.4. It's here pending a more comprehensive helper;
see http://bitbucket.org/bbangert/webhelpers/issue/2/reinstate-number_to_human_size

1.0b4

------------------

* Delete ``webhelpers.string24``. WebHelpers no longer supports Python 2.3.

* webhelpers.feedgenerator:

- Add a basic ``Geometry`` class for the Geo helpers.

* webhelpers.html.grid_demo:

- Demonstrates ``webhelpers.html.grid``. Run as
"python -m webhelpers.html.grid_demo OUTPUT_DIRECTORY".

* webhelpers.html.converters:

- Don't import ``render`` and ``sanitize`` to converters module.
(Reversed in 1.0b5.)

* webhelpers.html.secure_form:

- Move module to ``webhelpers.pylonslib.secure_form`` because it depends
on ``pylons.session``.

* webhelpers.misc:

- New helper ``flatten`` to interpolate embedded lists and tuples.
- New helper ``subclasses_only`` to extract the subclasses of an abstract
base class from a module or iterable.

* webhelpers.pylonslib.flash:

- Moved to its own module.
- Changed ``Flash.__html__()`` implementation.
- Categories may be specified in constructor. Patch by Eli Collins.

* webhelpers.pylonslib.grid:

- Bugfixes.

* webhelpers.pylonslib.minify:

- Bugfix.

* webhelpers.util:

- Bugfix: ``parse_qs`` moved from ``cgi`` to ``urlparse`` in Python 2.6.
Patch by Mike Verdone.

1.0b3

------------------
* webhelpers.feedgenerator:

- Allow either lat-lon and lon-lat formats in geometry data. The default is
lat-lon. For lon-lat, set ``GeoFeedMixin.is_input_latitude_first`` to
false. (You can set in a subclass or instance before writing the output.)
lat-lon is the most common format but GeoDjango and some other libraries
use lon-lat. The XML output is always lat-lon per the GeoRSS spec.

* webhelpers.html.grid:

- New module to create an HTML table from a list of records.

* webhelpers.html.tags:

- New helpers ``Doctype`` (class) and ``xml_declaration``.

- Python 2.5 compatibility fix by Yuen Ho Wong. (20)

* webhelpers.html.tools:

- New helper ``js_obfuscate`` implements the old rails helpers.

* webhelpers.util:

- New helper ``update_params`` to update query parameters in a URL.

1.0b2

------------------
* 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.

* 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.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.