[silva-dev] request.model in public layout
Jan-Wijbrand Kolman
jw at infrae.com
Tue Apr 4 13:17:38 CEST 2006
Hello,
We have added a fix to the Silva-1.4, Silva-1.5 lines and the upcomming
Silva version to prevent a potential memory leak.
This fix involves an explicit delete of the model from the request, when
the public layout is rendered. Having the model attached to the request
resulted in a cyclic reference of a type that could not be garbage
collected by Python.
The default Silva public layout templates make no use of the model that
used to be available and having the model on the request for public
rendering was never intended to be a public API. In public renderings,
the content object being rendered is available through the 'context'
namespace.
For the rare situations where you have developed code for the public
rendering of content that uses model.request (or model/request in a
pagetemplate) we now add the model to the request.other dictionary.
The upcomming bugfix releases for 1.4, 1.5 and the new Silva version
will include this fix.
(if you have questions about this, please send these to the mailing
list, as I might not be available to answer questions mailed to me
directly).
kind regards,
jw
--
Jan-Wijbrand Kolman
jw at infrae.com
More information about the silva-dev
mailing list