Commits

Mike Orr committed 6ad1620 Merge

Merge Ben's updates. Re-release version 1.0b1.

Comments (0)

Files changed (3)

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

webhelpers/feedgenerator.py

             handler.addQuickElement(u"link", u"", {u"href": item['link'], u"rel": u"alternate"})
             if item['pubdate'] is not None:
                 handler.addQuickElement(u"updated", rfc3339_date(item['pubdate']).decode('ascii'))
+                handler.addQuickElement(u"published", rfc3339_date(item['pubdate']).decode('ascii'))
 
             # Author information.
             if item['author_name'] is not None:

webhelpers/paginate.py

     # See if the collection is a sequence
     if isinstance(obj, (list, tuple)):
         return obj
-    # Is SQLAlchemy 0.4 available? (0.3 is not supported - sorry)
-    if sqlalchemy_available.startswith('0.4') or sqlalchemy_available.startswith('0.5'):
+    # Is SQLAlchemy 0.4 or better available? (0.3 is not supported - sorry)
+    if sqlalchemy_available[:3] != '0.3':
         # Is the collection a query?
         if isinstance(obj, sqlalchemy.orm.query.Query):
             return _SQLAlchemyQuery(obj)
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.