Change Log

1.5b2 (January 31, 2011)

Fixes

Default identity model classes/tables have been added to the SQLAlchemy
identity provider (#1453). These existed so far only for SQLObject.
The test suite now also covers the SQLAlchemy identity provider.

Changes

To avoid confusion, the json.py toplevel module of quickstarted projects
has been renamed to jsonify.py, because the Python 2.6 standard libary
now has a package with the json name that would be hidden by the project
package. Furthermore, the new name indicates better that this module is
actually the project specific version of the turbojson.jsonify module.

CherryPy now provides dummy request and response objects as simply
cherrypy.request, cherrypy.response. The dummy versions of these and
deprecated features have been removed from turbogears.testutil.

The configuration is now separated into server configuration (also
called site or global configuration) and application configuration.
The former config entries apply serve-wide, while the latter entries
only apply to specific mounted applications. You declare application
config settoings by writing using the path as a section header.

The config.get method is now request-aware, to ensure that the proper config
value is returned for the current application (only important when mounting
multiple applications).

Requests now have a stage attribute to tell you where they are in the
processing steps.

The reloader is no longer monkey-patched; the reloader of CherryPy 3
works just fine.

MonkeyDecodingFilter has been removed. It's no longer needed now that the
NestedVariablesHook runs after cherrypy.tools.decode.

Visit is now implemented as a CherryPy tool instead of a filter.

Removed startup.get_object_trail, as it's no longer being used.

startup.SimpleWSGIServer has been removed. Use cherrypy.wsgi.CPWSGIServer
instead.

startup.startTurboGears and startup.stopTurboGears have been renamed
to startup.start_turbogears and startup.stop_turbogears

The SafeMultipartFilter was not ported from TurboGears 1.1 to 1.5, since
it was a backport of CherryPy 3.1 functionality. You should use
cherrypy.lib.safemime instead.

Features

Allow custom attrwrapper and data as list, tuple or dict in DataGrid (#2478).

The paginate decorator automatically joins tables if necessary for sorting.

Erroneous plugins could cause unserviceable error messages. We now output
more informative warnings instead. Some other error messages have also been
improved, e.g. when using JSLinks, but Kid is not installed.

Changes

The new features and improvements in the external tgscheduler package
that had been sourced out have been backported to turbogears.scheduler.
Particularly, you can now get the task list, rename tasks, add tasks with
a cron-like syntax, and the package works properly with Python 2.6 and 2.7.

TurboGears 1.1.2 now requires the new and improved TurboJson 1.3 that also
works with recent PEAK-Rules versions.

The Toolbox now uses Genshi templates instead of Kid templates.

Added Kid as requirement again, since it's still needed for widget templates
and therefore indirectly also for i18n (#2518). Only TurboGears 1.5 will be
fully independent of Kid, since its widgets can use Genshi templates.

Moved getting default values from adjust_value() to display since
this works better with inheritance (#2477).

Contributors (in alphabetical order)

Pavel Strashkin, Christoph Zwerschke

1.1.1 (March 21, 2010)

Fixes

When collecting translatable strings (via command line or toolbox), gettext
calls in Genshi templates had been disregarded (#732).

It was not possible to enter Null values for optional fields using Catwalk.
Some fixes were made to solve this, particularly for numeric fields (#760).

Primary key strings did not work properly with Catwalk when updating (#1029).

Better error message in Catwalk if foreign key cannot be found (#1412).

SelectionField did not format values being rendered in template (#1314).

ToscaWidget resources listed in the tg.include_widgets setting were
not injected into the page header (#2025).

Widgets in the same module could not have the same class name (#2443).

The methods quote_cookie and unquote_cookie in turbogears.util
used the url quoting/unquoting mechanism instead of the one used by
the Cookie module in the standard lib. This lead to problems with WebTest
and potentially could also cause other compatibility issues (#2446).

The identity plugin did not work with input from nested forms (#1587).

Contributors (in alphabetical order)

1.1 (October 4, 2009)

Fixes

Name error in identity.SecureResource when require attribute not set
(r6686).

Unit test for model bootstrap functions in standard quickstart template
should not run when identity model can not be imported (r6692).

When a visitor requested a page shortly before the visit.timeout and
then again shortly afterwards, he could sometimes be logged of at the
second request because the visit manager had not yet updated the database.
This has now been fixed by first looking up visits cached in memory (#2346).

Added save_on_init as alias for autoadd kwarg of database.session_mapper
for backward-compatibility and fixed a bug occuring when mapping a class a
second time with session_mapper (r6747).

Genshi now uses adds correct doctype declarations to HTML and XHTML. By
default, the 'strict' variant is used (#1963).

Genshi engine now correctly changes the encoding when configured to do
so (r6787).

Features

There is a new config setting visit.interval allowing you to change
the visit manager time interval for updating the visit table in the database.
The setting must be specified in seconds; the default value is 30 seconds
(r6751).

The genshi.default_doctype configuration setting can now be a dictionary
mapping format names to doctype names. For details see the examples in
app.cfg in the default quickstart templates (r6787).

Changes

PasteScript version requirement is now >= 1.7 for Python 2.6 compatibility
(r6691).

TurboCheetah is not installed by default anymore (but Cheetah dependency is
pulled by PasteScipt). To install TurboGears with TurboCheetah support, use
easy_install TurboGears[compat] (r6691).

The turbogears.feed package is deprecated and using FeedController will
issue a deprecation warning (r6695).

The config setting "tg.defaultview" now has the default value "genshi".
This means that to use kid templates, one has to set tg.defaultview = "kid"
in the application's configuration or prefix template names with "kid:"
in the expose decorator (r6696).

A missing or faulty dburi raises a DatabaseConfigurationError exception
in most cases when trying to establish a database connection (r6714).

Instantiating SqlObjectVisitManager fails correctly if visit data model
tables can not be created (r6717).

Loading the template engine options from the configuration was changed so
that all options whose first part of the option name (i.e. everything before
the first dot) matches the start of the tempalte plugin name are passed to
the template engine when it is instantiated in view.load_engines. This
means, for example, that the plugin named "genshi" will receive all
genshi.* settings and the "genshi-markup" plugin will recieve those
as well and all genshi-markup.* settings too (r6756).

expose and view.render now take arbitrary keywords arguments, which are
passed as keyword args to the render method of template plugins, which
may use them as options for this rendering process. This replaces the
mapping keyword arg previously supported by expose and view.render but
which was never passed to the template renderer (r6783).

The config setting genshi.encoding is now genshi.default_encoding.
If you used this setting and it was set to something other than "utf-8",
you need to change your configuration (r6787).

New provisional favicon in quickstart templates. This may be replaced again
in a 1.1 bugfix release (r6789).

Projects with no identity support do not include superfluous code (e.g. in
model.py) and files (login.css and login.html) any more (#2049).

Identity failures during a requests to a controller exposed with
tg_format=json yielded a 500 error instead of 403. Additionally, when
no applicable controller method is found, !Turbogears now returns HTTP
status 404 (#2036).

tg-admin update did not detect when a project uses Elixir and would
overwrite the model with the standard SQLAlchemy based one (#2046).

A "i18n merge" took the last message of the same id, while "i18n compile"
took the last nonempty message. To make this consistent, "merge" now also
takes the last nonempty message. (As suggested by rejoc in ticket #2258).

Instead of a plugin name you can now specify a class in dotted-path notation
for the visit.manager config setting to use a custom visit manager
(r6651, thanks to Nic Bellamy fro provding the idea in #2260).

Support for JSONification of SQLAlchemy identity model objects in json.py
of quickstarted projects plus tests (r6657).

Many small improvements to the standard quickstart template files to enhance
clarity and conformance to Python coding standards (r6655, r6657).

Identity can now initiate HTTP basic authentication. Two new config settings
identity.http_basic_auth and identity.http_auth_realm have been added for
this purpose and are explained in the standard quickstart app.cfg (r6665).

Quickstarted projects now have a unit test case for the bootstrap functions
in model.py working for SQLObject and SQLAlchemy based model (r6673).

1.1b2 (December 2, 2008)

Features

The default login methods in the quickstart template now handles the case
when session cookies are disabled by displaying a warning to the user (#1628).

The standard quickstart templates define a new command line script entry point
'bootstrap-<yourpkg>', which install a script to bootstrap application data.
The corresponding function in 'commands.py' calls new code in 'model.py' to
set up tables and optionally add a default user (r5756).

'turbbogears.scheduler' now supports a new type of task called SingleTask,
i.e. a task which is executed only once at a specific time (#1710, Daniel
Fetchinson & Kevin Horn).

A new standard template variable 'tg_version' returns the version number of
the currently running TurboGears instance (r5449).

New config option safempfilter.on to enable the SafeMultipartFilter
(see end of 'app.cfg' in a quickstarted project for usage example) (r5666).

New config option 'catwalk.session_dir' to set the directory where the
CatWalk controller stores its state (r5733, Leandro Lucarella).

New config option 'genshi.new_text_syntax' to support the new Genshi text
template syntax (r5737, Raphael Slinckx).

Template format 'text' and 'plain' can now be used interchangeably for Kid
and Genshi (r5424).

i18n now can handle Genshi templates and extract text from them (r5704,
r5706).

New function 'absolute_url', which wraps 'url' and returns a full absolute
URL, including scheme and host name. Optionally uses two new config settings
'tg.url_domain' and 'tg.url_scheme' (r5690).

The root element of the CalendarDatePicker, AutoCompleteField and
AutoCompleteTextField widgets have been changed from DIV to SPAN
to allow them to be used inside elements, which can not contain other
block-level elements (e.g. SPAN). A class attribute is added to the
SPAN element, to allow it to be target by CSS rules easily (r5685).

A new erroneousfield class is added to a rendered form when a validation
erorr occured (r5668).

The 'turbogears.access' logger now logs messages that conform to the combined
log format (date was added and when remote host name is not available, logs
the IP address) (r5725).

If you pass fields when initializing a WidgetList, these will now be
appended to already existing fields declared in the class (before they had
been prepended), and WidgetField subclasses now inherit all the fields
of their base class (#2014).

Fixes

Misc fixes to various modules to handle a missing ORM module gracefully and
print a helpfull message when a user tries to start a project which needs
an ORM and it can not be imported (r5490, r5491, r5493, r5494, r5495, r5496).

Do not set 'forward_url' in login method when there are identity errors
(r5507).

The default content-type for Genshi template output is now correctly set
to 'text/html' (r5423).

Fix deprecation warning when using ToscaWidgets by not calling
retrieve_javascript/css on them in controllers._process_output
anymore, since tw takes care of including resources in the template output
(r5565).

When a visitor requested a page shortly before the visit.timeout and
then again shortly afterwards, he could sometimes be logged of at the
second request because the visit manager had not yet updated the database.
This has now been fixed by first looking up visits cached in memory (#2346).

The Genshi Buffet interface is now correctly initialized with the
default_encoding setting, not encoding (see end of #1963).

It was not possible to enter Null values for optional fields using Catwalk.
Some fixes were made to solve this, particularly for numeric fields (#760).

Better error message in Catwalk if foreign key cannot be found (#1412).

Primary key strings did not work properly with Catwalk when updating (#1029).

Pagination did not work with SQLAlchemy >= 0.6.

We now only pass string values as hidden fields in the login form, skipping
possible file fields which cannot be passed anyway (#1761).

Allowed nested validation schemas to be defined by nesting schema class
definitions and allowed schema classes, not only instances, to be attached
to form widgets (#2393).

Contributors (in alphabetic order)

Peter Russell, Christoph Zwerschke, Christopher Arndt

1.0.8 (December 17, 2008)

Changes

Charset parameters are now only added to content type headers when the
respective mime type supports this (e.g. all "text" types, but not "pdf").

Use "text/html" again instead of "application/xhtml+xml" for XHTML format,
as was done in version 1.0.7. Though it is more standards-compliant, IE
unfortunately does not cope with this content type, and we want to avoid
the problems of content negotiation (see ticket #1998).

tg-admin sql did not work with SQLAlchemy versions before 0.4.3 (#2057).

Hidden fields are now always put in an invisible 'div' section since they
must be contained in a block-level element to be valid (X)HTML (#2052).

The id of widgets like datagrid could not be changed at render time (#2023).

Improved some error messages and warnings.

Features

Made content type delivered for a template format configurable with the
tg.format_mime_types setting (see problem with XHTML content above).

TurboGears 1.0.8 now additionally includes MochiKit version 1.4.2, though
version 1.3.1 is still used by default. You can use the newer version by
setting tg.mochikit_version or tg_mochikit.version to '1.4' (#2018).

Forms have got a new use_name parameter that allows setting the id
attribute instead of the name attribute of the form, since the latter is
deprecated in HTML and invalid in XHTML (#2052).

Features

Contributors (in alphabetic order)

1.0.6 (August 26, 2008):

Improvements

Added max_limit and max_sort parameters to the paginate decorator
and deprecated allow_limit_override (#1908). Since the last version,
TurboGears sorts in memory, if sorting with SQL is not possible. Since
this may be costly, you can now set limits.

TurboGears now respects the SCRIPT_NAME CGI environment variable.
This allows better integration with mod_wsgi and other WSGI middleware
and more flexibility than using sever.webpath (#1919).

TurboGears now also sets request.path_info using a CherryPy? filter.
This is the same as request.path with both SCRIPT_NAME and
server.webpath stripped off.

Added a unicode_response attribute to the testutil.BrowsingSession
object if an encoding is specified in the Content-Type header. Tests can use
this much more safely.

If WidgetsList objects are passed in the controller dict, then the CSS
and JavaScript for all the widgets in the list will be included (#5190).

The forward/backward/goto links in the paginate data grid can now be styled,
and the default style shows them as buttons (way easier to click).

Contributors (in alphabetic order)

1.0.4.4 (March, 7, 2008):

Changes

cherrypy.request.sa_transaction is now always the SQLAlchemy transaction.
In the case of SQLAlchemy >= 0.4, this had been set to the SQLAlchemy session
before. You should't use this to explicitly commit or rollback transactions,
use database.session.commit() or database.session.rollback() instead.

Identities now have a login method creating the link to the visit;
this is not done in the provider method validate_identity any more.

TurboGears does not use a permanent visit cookie any more by default, i.e.
the cookie will now be discarded when the browser is closed (#1729). If you
want a permanent cookie to be used, set visit.cookie.permanent to True.
The visit.timeout setting controls how long the cookie is valid.

Features

Identies now have additional user_id and group_ids attributes.

Added an AutoCompleteTextField that can more easily replace an ordinary
TextField in a form (the AutoCompleteField is a CompoundWidget).

Contributors (in alphabetic order)

Florent Aide, Matej Baric, Jorge Godoy, Christoph Zwerschke.

1.0.4.3 (January, 31, 2008):

Fixes

Added a new config option (app.cfg) which controls the kind of redirection
the framework will raise in case of identity errors. By default TG used an
internal CherryPy redirect in such cases. But the problem was that if you
tried to use a failure url such as https://somewhere then CP raised a 404
error and that was all. Using this new system, you can activate _external_
redirects for identity errors by using the identity.force_external_redirect
in app.cfg. This will permit redirecting your clients to any HTTPS url that
is managed by an external apache or nginx rewrite rule.

Fixed the behavior of tg.mochikit_suppress which wasn't actually working.

Small improvements of the AutoCompleteField (Javascript clean-up;
nicer box for auto completions and no garbage when it is empty;
cursor jumps to end of text on update; with search_param = '*'
you can now pass all form fields to the controller; the spinner can
now be suppressed with show_spinner = False; the hidden field
is now optional in the Javascript code so that it can be reused if you
want to build a simpler TextField based widget; added parameter docs)

1.0.4: (January, 20, 2008):

Fixed parameters encoding. A previous patch encoded all characters
in the CherryPy parameters to make them utf-8. This comportment has
been reverted and unit tests written to ensure CherryPy parameters we
receive inside a TG application will alway be unicode.

1.0.4b6: (January, 16, 2008):

Changes

Fixed remote address inspection in the CherryPy headers because
it changed in version 2.3.0.

Contributors (in alphabetic order)

1.0.4b3: (December, 2, 2007):

Deprecations

Paginate default_order has been greatly improved. Use of the
default_reversed parameter has been deprecated. It will still be used
if it is informed, but a DeprecationWarning will be displayed.

Changes

Introduction of tg.mochikit_suppress to prevent the inclusion of
the shipped MochiKit 1.3.1. That allows to include custom mochikit versions.

PaginateDataGrid template now makes use of paginate attributes to render
the links for first/previous/next/last page (#1617).

paginate.href_last returns a special URL that allows paginate decorator
to compute the correct last page number at server-side (#1617).

The start-<project>.py script in a quickstarted project is now only a
wrapper for the start() function in a new commands module in the
project's package. The setup.py in new project also creates a console
script entry point for this, so easy_install can create a start script
when the project's egg is installed. It also allows to package a default
configuration file in the egg. For details see ticket (#1386).

Installation of TurboGears now does not require installation of an ORM.
Instead, a project that relies on SQLObject or SQLAlchemy will have a
setup.py file written with the proper requirements (#1501,#1620).

Features

The database module exports a mapper which is either session.mapper
for SQLAlchemy >= 0.4, or something similar to assign_mapper
for SQLAlchemy < 0.4, but compatible with SQLAlchemy 0.4 and Elixir.

The tg-admin quickstart command has now an option -r(--svn-repository) allowing automatic creation of the project in the
specified SVN repository.

Introduction of paginate.redirect_on_out_of_range and
paginate.redirect_on_last_page, which determine if paginate decorator
should raise a redirect when current page is out of bound and the
last page is requested, respectively.

Paginate default_order can now be a string or a list of strings.
The list of string is used to specify the ordering of multiple columns.
Every string starting with a dash (-) indicates that the column will
have its default ordering reversed (#1618).

turbogears.url() allows to to create an url with multiple values for the
same key (#1456).

Ticket #1434: Fixed pagination of Query objects (SQLAlchemy). The first
patch assumed that Query objects have a _query attribute which holds the
query object, which is only true for SelectResults objects.

Contributors

1.0.4b1 (September 13, 2007)

Changes

Ticket #1406: the cookies should have the same timeout as the session does,
this way it is possible to keep users logged in for longer than the time
the browser is running.

SQLAlchemy 0.4 support added. The identity part and the SA quickstart model
were changed to do this. For the moment only the standard SA model has been
changed, the tbig is still not fully SA 0.4 compatible.

Features

i18n support for Javascript (for real this time).

Ticket #1410: allows pagination of multiple variables, simply by using
the @paginate decorator multiple times on a particular controller.
It maintains backwards compatibility with previous code, but introduces
a new template variable: tg.paginates.

Fixes

SQLAlchemy exception handling and transaction support has been
improved and polished.

Added proper logging for exceptions that occured during the identity
providers. Thoses errors were lost silently before and made it hard to
understand from where the problem came.

Improved support for the SQLAlchemy command line interface.

Project Updates

A lot of unit tests have been fixed to support versions of nose
superior to 0.9.2. Paul also took great care to add more unit tests
to the SA handling in TG.

Now require TurboKid 1.0.3 for Kid support. This will pull out the
latest TurboKid that includes fixes for choosing the kid output format.

Contributors

1.0.3.2 (July 20, 2007)

Fixes

Ticket #1444: Genshi, while internally calling it "variable_lookup", has
a Buffet Engine plugin that expects "lookup_errors". TG 1.0 and 1.1 look
for and pass through only "variable_lookup", while TG 1.1 has
"lookup_errors" in configuration.
This helps in error handling with Genshi templates.
Patch by Neil Blakey-Milner.

r3318: Output format must not be set for other templating engines than
Kid, and needs not be set for Kid either. Removed unnecessary imports.
Christoph Zwerschke.

r3317: tg-admin toolbox did not run outside a project directory.
Christoph Zwerschke.

Contributors

1.0.2.2 (May 2, 2007)

Changes

New visit.cookie.secureconfig option to send cookie only over a secure connection. #1375 by James E. Blair.

cherrypy.request is now available at the variables sent to every template. #1362 by Christoph Zwerschke.

SA transaction object is now stored at cherrypy.request.sa_transaction so it can be accessed from the controllers. Patch at #1359 by Janzert.

SecureResource now raises an AttributeError when no require attribute is present in the controller class or in the config file. Closes #1336. (Note: This might break some "broken" apps, fortunately a detailed exception is raised advising how to fix it).

Project Updates

0.9a8 (July 21, 2006)

Fixes

Some problems with the calendar widget that were introduced in 0.9a7 have been addressed

Some people have reported getting an SQLObject 0.8 dev package, which is not at all tested with TurboGears. The setup file for TurboGears will now restrict to < 0.8.

Project Updates

Kid 0.9.3 (addresses problems that people had with comments in base templates)

0.9a7 (July 19, 2006)

Backwards Incompatibilities

Former LocalizableJSLink is now CalendarLangFile. New LocalizableJSLink is simpler but backwards-incompatible.

Catwalk no longer accepts an allowHost argument. To restrict access to it use Identity.SecureObject instead.

Deprecations

Use of entrys is now deprecated in the FeedController. You should use entries instead.

Features

Syntax highlighter is used in the widget browser to make the code snippets look nice (#843)

Logging configuration produces better errors and also has access to the RotatingFileHandler and TimedRotatingFileHandler (#866, also fixes #820)

The validate decorator now accepts a state_factory parameter which should be a callable that returns the initial state for validation (the same state parameter FormEncode validators use). The final state after validation can be accessed at cherrypy.request.validation_state inside controller methods.

tg-admin commands can state if they need to be run in a project dir.

Toolbox now uses entrypoints so site-specific tools can be added.

tg-admin shell now asks if it should commit changes to the database on exit.

Widgets can be listed at the tg.include_widgets config. list to send them to every template (a la tg.mochikit_all).

DBTest now drops tables after each test so they don't interfere with others.

Toolbox is now secured using Identity

SQLAlchemy support not only works again with the latest SQLAlchemy, but quickstart works properly and tg-admin sql create now works for SQLAlchemy databases for the first time.

Fixes

The sample-prod.cfg file had an incorrect logging configuration.

Simplified visit queue handling which solves some mysterious bugs.

QUICKSTART: model.py now includes SQLObject¿s requirements when identity is off.

0.9a6 (May 9, 2006)

Backwards Incompatibilities

i18n.runTemplateFilter in the config file has been renamed i18n.run_template_filter (#796)

For people using FastData (experimental): get_add_url, get_edit_url and get_delete_url all are passed the row instead of the ID now, allowing you to use something other than the ID if desired.

In widgets, if you were using a dictionary as a params be aware that now the dictionary is not updated at construction or display/render time but simply replaced with the new one. If you were using it to provide default attributes for your widget, take a look at how the TableForm does that.

Features

A new function, turbogears.util.find_precision, to tell you how many decimal places of precision are required. (To help with i18n.format.format_decimal which needs to know the precision.)

tg-admin info shows which eggs require TurboGears

In widgets, SelectionField now supports grouped options, SingleSelectField and MultipleSelectField widgets take advantage of this to provide an optgroup tag. The format of a grouped options list is like the following:

The Widget Browser now displays the source of the example and the template provided by default in the widget (to allow for easier complete customization) (#840, #841)

Tabber and Syntax Highlighter widgets are now included

Changes

sqlite database URIs can now be specified as sqlite:///c:/foo/bar on Windows, which is more natural for users. (The sqlite:///c|/foo/bar syntax still works.)

ValueError is raised if an InputWidget contains "." or "-", which are reserved for use by the widgets

Package name is used instead of your_project in the quickstart logging config.

Fixes

QUICKSTART: an exception comes up if a user logs in but is not in a group that is required for access. The line with if not identity.current.anonymous and identity.was_login_attempted() in controllers.py or root.py needs an additional and not identity.get_identity_errors() condition. (#834)

QUICKSTART: quickstart projects that used identity would generate a table called user, which is invalid for some databases. The new quickstart model.py generates tables called tg_user. #805

QUICKSTART: there were problems with the model template for SQLAlchemy (#801)

SQLAlchemy's identity provider was not selected by default when you quickstart a new project. (#806)

Core widgets all include WidgetDescriptions now and appear in the Widget Browser in the Toolbox (#727)

0.9a5 (April 26, 2006)

Backwards Incompatibilties

An identity login form must have a submit button having the name specified in the config file (identity.form.submit). If you have a commented identity.form.submit value and used the default login.kid file, you will need to add name='login' to the login.kid submit button.

In widgets, the base Widget class no longer supports a validator. If you need a validator you should use the InputWidget class

In widgets, the display and the adjust_value methods have a slightly different signature (if you happen to use the convert parameter, you just need to use it as a keyword parameter and not a positional one.)

decorator() should be applied to the function accepting the function being decorated (entangle by convention), not the caller.

Removed keyword argument ¿argsink¿ from decorator(), weak_signature_decorator() should be used instead.

Deprecations

In widgets, template_vars in widgets are now called params and options_for has been renamed params_for

In widgets, the update_data method has been renamed update_params

Identity has moved to PEP8 style naming. Changed userId, groupId, and permissionId to be user_name, group_name, and permission_name.

visit_id has been deprecated in favor of visit_key

SQL scripts to migrate PostgreSQL and MySQL identity databases are available (#737)

Features

Dramatically improved and unified logging configuration. Config files can now use the options in Python's logging module for log formats and output.

TurboGears now includes an enhanced version of Irmen de Jong's Kronos scheduler, allowing you to schedule tasks that run in separate threads or processes periodically.

For Python 2.3 users, there is a convenient new decorator syntax that comes from Phillip Eby's PEAK.

Here's is the equivalent of @expose():

[expose()]

def index(self):

pass

Added a new turbogears.start_server function which will help ease the transition to 1.1 and adds the ability to use Ian Bicking's EvalException. You must turn on tg.fancy_exception to use it at this point.

In widgets, if the widget you are using provides a default validator, for example a SelectionWidget, you can tweak its parameters by just passing a dictionary of those parameters as validator (for example, validator=dict(not_empty=True))

In widgets, every attribute listed inside params now supports callables automatically (the attribute will be called for computation at request time)

Some improvements to the ImageButton widget

More customization hooks for CheckBoxList, RadioButtonList, TableForm and ListForm

It's now possible to determine what permissions are required for a given controller method (#603)

Changes

Identity model classes are now placed directly into the model.py of a quickstarted project. This new setup is much easier to change, since requirements for the identity model vary dramatically. Another advantage is that quickstart projects that don¿t need identity start off with cleaner code, and projects that do need identity need almost no additional configuration or setup.

quickstart projects include a json.py file as a home for JSON view code.

i18n scan command has been changed to collect to match the admi18n Toolbox tool

If you quickstart a project while in an svn checkout, files are no longer automatically svn added. This corrects some problems that people ran into with that behavior.

The prod.cfg file in quickstart projects is now called ¿sample-prod.cfg¿ to reflect that it is just used as a sample that you copy to your real production servers (#762).

The various classes used to make dictionaries look like normal objects have been replaced by turbogears.util.Bunch (#779)

0.9a2 (March 27, 2006)

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. (#607)

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. (#670)

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). (#654)

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. (#676)

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). (#636)

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.

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. (#669)

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. (#593)

The AutoCompleteField turns off the browser's own autocompletion. (#637)

A nicer error message is provided if you return something other than a string or a dict from your controller method. (#643)

admi18n does a better job of grouping files in the correct folder when collecting strings and skips over folders like .svn. (#512, #678)

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. (#683)

0.9a1 (February 23, 2006)

Backwards Incompatibilities

turbogears.expose no longer provides JSON by default. You need to turn on JSON via the config file or by the allow_json parameter to expose.

The server.webpath configuration variable will not only properly set outgoing URLs, but will also "fix" incoming URLs if TurboGears is running as some path underneath another webserver. If you were previously running a CherryPy filter to handle this, you no longer need to.

Directories of static files need an absolute path. The new configuration file format makes it easy to provide an absolute path without truly being tied to that path.

Previously, if you were using a FormEncode Schema for validation for an exposed method, validation would fail if a value was missing but the method had a default value for that parameter. Now, if that value is missing, the method will get called with the default just as it is normally called in Python.

Deprecations

In templates the "std" object that holds common values and functions has been changed to "tg".

turbogears.controllers.Root has now become turbogears.controllers.RootController for clarity's sake. Root continues to work, but its use is deprecated.

Error handling has been greatly improved. Use of the validation_error method has been deprecated. It will still be called if it exists, but a DeprecationWarning will be displayed.

turbogears.tests.util has been moved to turbogears.testutil

CherryPy has switched to PEP8-style names for things. The old names still work. However, they are deprecated.

expose(html=.. is now deprecated in favor for expose(template=..

the old config file format is deprecated in favor of the new Python module format.

Features

The TurboGears Toolbox wraps a number of useful tools in one web interface. The toolbox can be extended with additional tools. Run the Toolbox with tg-admin toolbox.

CatWalk model/database browser is now part of the TurboGears Toolbox. Thanks to Ronald Jaramillo.

There is a new internationalization package that allows you to use to conveniently localize your application via gettext. Thanks to Dan Jacob.

Internationalization can be managed via the Toolbox (thanks to Ronald Jaramillo) or the command line (thanks to Max Ischenko).

Each request is implicitly wrapped in a Transaction. This solves caching issues and reduces boilerplate code. It also helps codify a best practice so that bad data does not end up in your database.

Error handling for a method can be specified with an error_handler decorator thanks to Simon Belak.

TurboGears now has a feed object that can generate rss2.0, atom0.3 and atom1.0 feeds

Template encodings other than utf-8 can be selected with the new kid.encoding variable

tg-admin now uses PasteScript and can now supports user specific templates

tg-admin now have a update command

TurboGears is now compatible with Python 2.3, thanks to Paul Clifford.

TurboGears supports plugins for template engines, tg-admin commands

A plugin for Cheetah templates has been released separately

TurboGears now uses nose for testing

Templates can now be specified relative to the current package by preceding the template name with ".". For example, if you have a controller in "yourpackage" with templates in a package under that package, you can use "yourpackage.templates.templatename" or ".templates.templatename". Thanks to David Bernard.

New commands can be added to tg-admin via the turbogears.command entry point. Thanks to Elvelind Grandin.

Controllers that subclass controllers.Controller (including the standard RootController) can automatically use positional parameters for the methods. This means that "/entry/MONTH/DAY/YEAR" can be interpreted easily by a method entry(self, month, day, year).

MochiKit can now be included in your final HTML output by putting turbogears.mochikit in your output dictionary (it doesn't matter what the key assigned is). The advantage to doing this is that it helps to ensure that MochiKit is included only once, even if you're using widgets that require it.

MochiKit can be enabled everywhere by setting tg.mochikit_all to True in your config file.

Added new "cycle" object to std in template usage. This makes it easy to cycle through a number of values (and it also lets you retrieve the current value). This is useful for things like even and odd row classes, etc. Thanks to Karl Guertin.

You can send a random value in to the controller (tg_random) that will be automatically thrown out to get around issues with Internet Explorer caching data too aggressively.

The expose decorator has been split into input and output functions. expose continues to handle output, and the new validate decorator handles input (validation and form handling). This new setup makes it easier to mix in your own decorators if you need to.

Added turbogears.redirect which wraps the cherrypy.HTTPRedirect exception to automatically call turbogears.url to help ensure properly formatted URLs. You can either call turbogears.redirect or "raise turbogears.redirect" if that makes the intent clearer to you (as happens with the existing usage of cherrypy.HTTPRedirect)

There is a new configuration file format that are slightly specialized Python modules. This allows you to run Python code to determine your configuration.

You can now specify that you're generating a fragment of a page (rather than an entire page) at expose time by passing fragment=True in to expose. This is useful if you want Kid to generate part of a page for an XMLHttpRequest, for example.

There's a new validator, JSONValidator, that reads/writes JSON, which is convenient for parameters that are coming in via JSON.

new test stuff (expand)

There is now a tg-admin info command that shows all the version info for the tubogears components.

0.8.9 (February 6, 2006)

0.8.8 (January 10, 2006)

A security flaw was discovered in CherryPy's static filter. This TurboGears update changes the CherryPy requirement to 2.1.1.

0.8.7 (January 4, 2006)

This update primarily solves installation issues and is not required otherwise.

quickstart corrected to properly produce egg-info directories (previously, directories could be created with "-" when it should have a "_"). Note that setuptools 0.6a9 will warn you if you have a - in your egg-info directory name. Just rename the directory, and you'll be fine.

Installation issues that people may have had earlier are resolved in this setuptools update.

version number set to 0.8.7 to reflect that this is considered the "stable" version of TurboGears vs. the current 0.9 code in svn.

Project Updates

setuptools 0.6a9

sqlobject 0.7.1dev_r1457 (updated to handle the setuptools change, but also includes other bugfixes)

0.8a6 (December 26, 2005)

Chained validators will now cause an Invalid exception to be raised as appropriate. (#44)

When validation would fail, previously an unexpected exception may be raised when an Invalid exception is expected. (#190)

quickstart didn't look out for .pyo files in the same way that it did .pyc files. (#260)

Project Updates

json-py updated to 3.4

0.8a5 (December 2, 2005)

setup has been changed to ensure that people properly get the CherryPy 2.1 release version.

Project Updates

Kid updated to 0.8.0

MochiKit updated to 1.1

FormEncode updated to 0.4

setuptools updated to 0.6a8

0.8a4 (October 25, 2005)

Project Updates

setuptools 0.6a6

CherryPy 2.1 final

MochiKit 1.0

Fixes

On some servers, TurboGears can take a minute to start answering connections due to the way the OS handles incoming connections to ports that have nothing listening on them.

0.8a3 (October 16, 2005)

Fixes

setup.py was not using setup_requires in a productive way. This has been changed, so tg-admin quickstart will no longer need to go to the internet to function.

turbogears.database.setdburi was not properly putting the setting in the global config section. By Robert Leftwich.

some people have had trouble with the url function not being able to find cherrypy.request.approot. This may be due to older classes that do not extend controllers.Root. This was not listed as a requirement for the URL function. The documentation for the url function has been updated, and the code has been updated to always set the approot to the top of the site at least.

0.8a2 (October 14, 2005)

Fixes

tg-admin quickstart was missing the appropriate egg-info for the sql commands to work properly

0.8a1 (October 12, 2005)

Backwards Incompatibilities

All of the "turbogears*" variables have been changed to "tg_". These are tg_template, tg_format, tg_flash and tg_js. (Note that turbogearsfmt has become tg_format and tg_html has become tg_template.)

The StringBoolean validator (which has moved into FormEncode proper) now returns strings for from_python. For example, from_python(True) now returns 'true'. It used to return True. (#4)

turbogears-admin.py is now called tg-admin and is automatically generated by setuptools (#10)/

The tg-admin sql commands now require a properly setup .egg-info directory to automatically find the model classes. If the egg info is not properly set up, the command can fix it automatically.

The view.render method's "html" parameter has been renamed "template" to reflect that the templates might be for XML presentations. Most people don't call view.render directly.

New Features

There is a new PackageHub that is designed to allow different parts of a site to use different databases. Use of the PackageHub works just like the AutoConnectHub.

Added a new function: turbogears.database.set_db_uri. This is a more pleasant wrapper around the CherryPy config variables that can be used in command line tools and the like.

IPython is used in tg-admin shell, if it's available. By David Guaraglia.

You can specify a default format via the new format parameter to expose. For example, expose(format="json") will cause the method to output JSON by default, even if HTML is available. By Elvelind Grandin.

You can specify the Content-Type via expose. Example: expose(content_type="text/javascript"). By Elvelind Grandin.

expose now has a "template" parameter that can be used in place of "html". This is more pleasant for non-HTML applications.

On Macs, if you're running in development mode the server will be advertised via Bonjour. If you enable Bonjour bookmarks (via the Bookmarks Preferences tab in Safari), you'll see your development server show up automatically. By Bob Ippolito.

There is now a url function that can be used to generate URLs conveniently and, more importantly, with an appropriate view of where the root of the web application is.

validators can now be specified with a dict (the 0.5 way) or with a FormEncode Schema, which provides more options. By Fabian Neumann.

In quickstart, project-start.py now takes a config file on the command line. By Elvelind Grandin.

project-start.py is also made executable automatically. By Fabian Neumann.

Added turbogears.tests.util.call function to allow you to call a controller method and get the dictionary back without processing to HTML or JSON. This allows you to test controller logic independent of presentation. (#31)