Anonymous avatar Anonymous committed e6e4535

Documentation.

Comments (0)

Files changed (6)

docs/_templates/index.html

 <a href="http://routes.groovie.org/">Routes</a>, 
 <a href="http://python.org/pypi/Unidecode/">unidecode</a>, 
 <a href="http://pythonpaste.org/webob/">WebOb</a>, or
-<a href="http://pylonshq.com/">Pylons</a>, or
+<a href="http://pylonshq.com/">Pylons</a>,
 as noted in their documentation.  WebHelpers requires Python 2.4 or higher,
 and has not yet been tested with Python 3. An extensive test suite for doctest
 and Nose is included.</p>

docs/contents.rst

 WebHelpers Documentation
 ========================
 
-Subpackages
------------
-
 .. toctree::
    :maxdepth: 1
    
-   overview
    modules/__init__
    modules/constants
    modules/containers

docs/overview.rst

-Overview
-===================
-
-.. automodule:: webhelpers

webhelpers/__init__.py

-"""Functions useful in web applications (and other applications)
+"""WebHelpers contains a wide variety of functions for web applications.
+It's pure Python and can be used with any web framework, and many of the
+helpers are also useful in non-web applications.
 
-WebHelpers provides a wide variety of functions useful in any web application,
-including an HTML tag generator with smart escaping, tag functions,
-text-to-HTML converters, a paginator, etc.  These can be used in any web
-framework.  A few Pylons-specific helpers are in ``webehlpers.pylonslib``;
-these can be ported to other frameworks by simply replacing the
-framework-specific API calls (request/response/session/URL).
+WebHelpers includes the widely-used HTML tag builder with smart escaping and
+convenience functions for common tags. These ensure the HTML tags are
+syntactically correct and prevent cross-site scripting attacks. Convenience
+functions for form input tags and other common tags are provided.
 
-Some helpers are also useful in non-web applications.  There are text
-formatters, advanced container types, country & state abbreviations, simple
-numeric statistics, etc.
+Other helpers perform text processing, display records a pageful at a time,
+generate Atom/RSS feeds with geographical (GIS) data, handle MIME types,
+calculate statistics, and more.  There are also high-level container types,
+including a value counter and accumulator.  There are lists of country names,
+country codes, US states, Canadian provinces, and UK counties.
 
-The main criteria for incuding helpers are: 
+WebHelpers requires Python 2.4 or higher. It has not yet been tested with 
+Python 3.  WebHelpers has no formal dependencies; however, a few individual
+helpers depend on 
+`Routes <http://routes.groovie.org/>`_, 
+`Unidecode <http://python.org/pypi/Unidecode/>`_, 
+`WebOb <http://pythonpaste.org/webob>`_, or
+`Pylons <a href="http://pylonshq.com/>`_,
+as noted in their documentation.
+
+The main criteria for adding new helpers are: 
 
 * Is it useful in a wide variety of applications, especially web applications?
 
 * Is it too small to be released as its own project, and is there no other
   Python project more appropriate for it?
 
-Helper functions are organized into modules by theme.  All HTML generators are
-under the ``webhelpers.html`` package, except for a few third-party modules
-which are directly under ``webhelpers``.
-
-WebHelpers depends on Routes 1.x due to the unit tests and deprecated Rails
-helpers.
-
-Users of WebHelpers 0.3 will notice significant changes in 0.6.  All helpers
-ported from Rails (the ``webhelpers.rails`` package) have been deprecated, and
-most have been replaced with new functions in ``webhelpers.html`` or elsewhere.
-``from webhelpers import *`` no longer imports all helpers; you must
-specifically import the modules or functions you want.  Javascript libraries
-(Prototype, Scriptaculous, and ``link_to_remote()``) have also been deprecated
-because the Javascript state-of-the-art changes too rapidly.
-
-Pylons applications ported to Pylons 0.9.7 that depend on the deprecated Rails
-helpers should add the following to myapp/lib/helpers.py::
-
-    from webhelpers.rails.wrapped import *
-    from routes import url_for, redirect_to
-
-A few helpers have external dependencies as noted in their module docstrings.
+WebHelpers was originally created as a utility package for Pylons. Many of the
+helpers were ported from Ruby on Rails. Version 0.6 introduced the HTML tag
+builder and deprecated the rails helpers; new subpackages were added to replace
+the rails helpers. Version 1.0 builds on this with many additional helpers.
 """

webhelpers/html/__init__.py

+"""HTML generation helpers.
+
+All public objects in the ``webhelpers.html.builder`` subpackage are also
+available in the ``webhelpers.html`` namespace.  Most programs will want
+to put this line in their code::
+
+    from webhelpers.html import *
+
+Or you can import the most frequently-used objects explicitly::
+
+    from webhelpers.html import HTML, escape, literal
+"""
+
 from webhelpers.html.builder import *

webhelpers/media.py

 
     Returns ``(width, height)`` as two integers, or ``default`` if the size
     could not be ascertained.  Failure usually means the file does not exist
-    or is not in a recognized format.  Only JPG, PNG, GIF, BMP are supported at
-    this time.
+    or is not in a recognized format.  Only JPG, PNG, GIF, and BMP are
+    supported at this time.
 
     The algorithms are based on a `PyCode recipe
     <http://www.pycode.com/modules/?id=32&tab=download>`_ by
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.