Docudo screencast

Ronald Jaramillo is introducing Docudo with a new screencast. The project is still in its early stages. Join in while there’s still neat stuff to do!


Merquery – packaging up indexing for the masses

Brian Beck is starting work on a project named Merquery, with the goal of making full text indexing (aka “a search engine”) trivial for users of rapid development frameworks like TurboGears. Reading the post that I’m linking to, it doesn’t sound like Brian is reinventing the search engine wheel. Making a high-quality engine is hard work and has been done by a number of projects already. Brian is talking about providing a drop dead simple API for getting the engine running with your database. That’s a great goal, and many projects (Docudo, TurboBlog, Fast Track come to mind) could benefit greatly.


freeform: natural interpretation of loosely structured user phrases

freeform: natural interpretation of loosely structured user phrases is one of those things that I don’t need right now, but seems useful enough for the future. It’s designed to handle free form text input and make sense of what the user has entered.


stubble

stubble: create stubs for your unit tests (also includes support for making stand-ins for Eggs!)


The adventures of scaling, Stage 1

Simon Belak on the TurboGears list points to The adventures of scaling, Stage 1, an article about scaling a database-intensive reasonably high traffic (~1M page views a day) site based on Ruby on Rails. The author hits upon many of the common topics in scaling LAMP architecture sites. One thing I didn’t see mentioned, probably because it wasn’t particularly relevant for his application, is data partitioning. Any opportunity to break up your database into multiple chunks that can potentially be deployed separately can be a big win in terms of scalability.

The kinds of things they had to do for eins.de is very common in the LAMP stack and certainly applicable to TurboGears users.


TurboGears 0.9a2 released!

I’m happy to report that TurboGears 0.9a2 has been released! We’ve had a whole raftload of feedback and contributions since the release of 0.9a1. 0.9 is becoming considerably more solid, but I’m not going to upgrade it to “beta” until there are more docs. Be sure to read the upgrade instructions, because you’ll need to make some changes to come from 0.9a1 or 0.8 to this release.
TurboGears Changelog

Backwards Incompatibilities

  • Due to Python 2.3 issues and some additional discussion, the config files have gone back to an INI-style format. This means that some minor changes are needed if you were using the 0.9 “.pyâ€? config files, but no changes are required for people using 0.8 “.cfgâ€? config files. See the upgrading guide for details.
  • If you used CompoundWidgets in 0.9a1, “widgetsâ€? has changed to “member_widgetsâ€?.
  • If you are using a Form or a FieldSet widget you must explicitly pass the “fieldsâ€? parameter, the first positional parameter expected since 0.9a2 is “nameâ€?.
  • If you are using a Form or a FieldSet widget with a custom template you must update your template accordingly to the new templates TG is using.

Deprecations

  • WidgetsDeclaration (introduced in 0.9a1) has been renamed WidgetsList for clarity.
  • turbogears.config now has get() and update() functions that should be used in place of their cherrypy.config counterparts. This change was made knowing that there will be more powerful, TurboGears-specific configuration in TurboGears 1.1.
  • The field_for method of a Form (introduced in 0.9a1) has been deprecated and it’s use is highly discouraged and error prone, use display_field_for or render_field_for instead.
  • In the turbogears.view module variableProviders has been renamed variable_providers.
  • turbogears.fastdata.formmaker’s sqlwidgets function (introduced in 0.9a1) has been renamed fields_for.

New Features

  • Controller methods can now have multiple expose() decorators, allowing you to define different output formats (even with different template engines) that can be chosen via tg_format or the Accept header.
  • New AjaxGrid widget provides a grid in JavaScript that is populated via an Ajax call.
  • Three new base widgets to manage forms have been introduced: CompoundFormField, RepeatingFormField and FormFieldsContainer.
  • Experimental support for SQLAlchemy. For more complicated databases or certain database requirements, SQLAlchemy handles the database more gracefully. The main database layer for TurboGears remains SQLObject and SQLObject is more fully supported within TurboGears. However, for those who need it, SQLAlchemy support is there.
  • display_field_for and render_field_for are automatically added to the template scope of any FormFieldsContainer widget and can be used to easily display/render a field with the corrects value and options.
  • The basis for creating repeating sets of widgets has been created (see RepeatingFormField and RepeatingFieldSet for an example)
  • Catwalk can filter the data you see
  • When using widgets, you can now have more than one form on a page while retaining validation sanity.
  • With widgets, required fields automatically get a CSS class
  • CompoundWidgets/Forms now use FormEncode schemas, which provide a number of additional validation options.
  • AutoCompleteFields can now pass an ID back to the server when submitted (instead of just passing the matching search string).
  • quickstart includes a “release.pyâ€? file where you can put your project information (including version number). This is the safe mechanism for allowing your project itself to access the version number while your setup script also has access to the same information (Don’t Repeat Yourself)
  • quickstart has a new “tgbigâ€? template designed for larger projects. This adds a controllers package to the basic TurboGears template.
  • CSSLink and CSSSource widgets now support “mediaâ€?
  • The AutoCompleteField now has an “only_suggestâ€? flag which makes it so that the first item on the list is not automatically submitted when you press return. This is useful for search boxes (as opposed to data entry fields).
  • The turbogears.startup now contains callonstartup and callonshutdown lists. You can append callables to these to have them executed at the right time.
  • If you are using the i18n support, the _ function (alias of the gettext function) is now properly mapped to lazygettext if needed, this means you can use “â€? for everything.
  • Added LocalizableJSLink widget that allows scripts to be chosen based on the user’s locale.

Changes

  • log_debug_info_filter is now turned off by default (this is the CherryPy filter that lists the request time). This filter causes problems with things like JSON output. You can still turn it back on via the config file.
  • Unless you specifically configure the decodingFilter yourself, TurboGears will automatically turn on CherryPy’s decodingFilter (expecting utf-8 input).
  • cherrypy.lowercase_api is set to True in new quickstarted projects. This should result in a performance boost, and requires that you use PEP 8 style names when calling CherryPy APIs/config values.
  • Table forms now use TH tags for the field labels, making it easier to apply appropriate styling to the tables.
  • AutoConnectHub used to support a “processConnectionâ€? (something it inherited from SQLObject). This is not really a supported model of operation, so it has been removed. If you do want to work that way, use SQLObject’s own ConnectionHub class.
  • The test_model test has been commented out from the quickstart template, because some projects don’t have databases.

Fixes

  • The TextArea widget now posts properly within a RemoteForm.
  • Catwalk styling cleanup
  • Catwalk no longer has problems with empty tables with foreign keys
  • ForEach validator added to turbogears.validators namespace
  • Catwalk will show related joins in the edit view
  • SQLObject identity provider passwords are automatically encrypted (this was in 0.9a1). This didn’t work properly when identity wasn’t fully running (as in the tg-admin shell). This has been fixed.
  • The AutoCompleteField turns off the browser’s own autocompletion.
  • A nicer error message is provided if you return something other than a string or a dict from your controller method.
  • admi18n does a better job of grouping files in the correct folder when collecting strings and skips over folders like “.svnâ€?.
  • The turbogears.url() function was flipping around path elements in the application root. Applications roots are not commonly used right now, but this was noticeable if you used the FeedController.
  • Various fixes for CatWalk’s database access (see tickets #568, #249, #213, #618)
  • ModelDesigner and admi18n can find your model.py file even if you change your package name at quickstart time.

Project Updates

  • Kid 0.9 / TurboKid 0.9.2
  • CherryPy 2.2.0rc1
  • PasteScript 0.5
  • TurboGears’ JSON output now comes from the TurboJson plugin

Contributors

This release comes to you thanks to the work of Michele Cella, Elvelind Grandin, Ronald Jaramillo, Simon Belak, Jeff Watkins, Alberto Valverde González, Jason Chu, Owen Mead-Robins, Dan Weeks, Dennis Brakhane, Heikichi Umahara, Patrick Lewis, Joost Moesker, Roger Demetrescu, Liza Daly.


TurboGears googlegroup passes 1,500 members

The main TurboGears mailing list has just passed 1,500 members. Even with the 0.9 release in an underdocumented alpha state, we’ve still got new people showing up every day. The list broke 1,000 back in January.

Another interesting milestone on the mailing list: it looks like Jorge Godoy is going to beat me out for top poster this month! And Jorge and I are both running well behind Michele Cella for top poster on the TurboGears Trunk mailing list. It’s definitely a sign of a thriving community to see the lists humming along like this.


Setting up supervisor (on a single machine)

Titus has written a nice introduction to Supervisor in: Setting up supervisor (on a single machine)


Fast Track – open source project status in TurboGears

The good folks at Optio, with much urging from Jonathan LaCour, have open sourced Fast Track. I had a chance to see an earlier version of Fast Track when I visited Optio in December. It’s a nicely done “project status” tool. Many companies rely on awful, emailed status reports to keep people up to date (using which project managers often have the unpleasant responsibility of updating Gantt charts and whatnot). Fast Track is a very simple way for people to communicate up or down the chain of command about the status of a project.

When I saw it, Fast Track was a TurboGears 0.8 project. Recently, they’ve given it the full TG 0.9 treatment. Check it out, give it a whirl and add on to it (it’s generously licensed under the MPL, so you can use it with commercial and non-commercial projects alike).


pytemplates mailing list

TurboGears has an interface for template engines that now supports quite a few template tools and CherryPy and Pylons as hosts for those templates. It’s quite simple to work with, but there are still a couple of things that need to be done to it. Since there are a few people involved on both sides (template plugins and plugin users), I thought it practical to set up a mailing list to finish hashing out interface changes and get them out there.

If you’re into that kind of thing, here’s the group: pytemplates