<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-16259</id>
	<title>Nabble - Turbogears General</title>
	<updated>2009-12-22T07:30:49Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Turbogears-General-f16259.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Turbogears-General-f16259.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26890053</id>
	<title>Re: file uploading with flex</title>
	<published>2009-12-22T07:30:49Z</published>
	<updated>2009-12-22T07:30:49Z</updated>
	<author>
		<name>ahmed.amamou</name>
	</author>
	<content type="html">problem solved
&lt;br&gt;i find that flex send the file in a dict
&lt;br&gt;&lt;br&gt;&lt;br&gt;fileref.upload(request,&amp;quot;file&amp;quot;,false)
&lt;br&gt;to find it in turbogears you have just to put
&lt;br&gt;&lt;br&gt;f=kw[&amp;quot;file&amp;quot;]
&lt;br&gt;data=f.read()
&lt;br&gt;&lt;br&gt;On Dec 22, 11:12 am, hosonno &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26890053&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmed.ama...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; hi everybody
&lt;br&gt;&amp;gt; i just started using turbogears 1.0.8
&lt;br&gt;&amp;gt; i have some problemes in uploading file using flex front end
&lt;br&gt;&amp;gt; i didn't find a way to make turbogears work with objectfilereference
&lt;br&gt;&amp;gt; ( the type returned by flex when using upload methode.
&lt;br&gt;&amp;gt; can anybody help me to find a documentation about this
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26890053&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26890053&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/file-uploading-with-flex-tp26887080p26890053.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26887080</id>
	<title>file uploading with flex</title>
	<published>2009-12-22T02:12:29Z</published>
	<updated>2009-12-22T02:12:29Z</updated>
	<author>
		<name>ahmed.amamou</name>
	</author>
	<content type="html">hi everybody
&lt;br&gt;i just started using turbogears 1.0.8
&lt;br&gt;i have some problemes in uploading file using flex front end
&lt;br&gt;i didn't find a way to make turbogears work with objectfilereference
&lt;br&gt;( the type returned by flex when using upload methode.
&lt;br&gt;can anybody help me to find a documentation about this
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26887080&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26887080&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/file-uploading-with-flex-tp26887080p26887080.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26884720</id>
	<title>Re: Validation in tg2</title>
	<published>2009-12-21T23:13:55Z</published>
	<updated>2009-12-21T23:13:55Z</updated>
	<author>
		<name>jitesh-3</name>
	</author>
	<content type="html">I am also facing very same problem as of Ranjan and am also using the
&lt;br&gt;same version of Turbogears.
&lt;br&gt;Needing help
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;jitesh
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Dec 21, 12:02 pm, Ranjan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ranjan.n...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;  I have changed the 'MyForm' slightly as follows:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; class MyForm(TableForm):
&lt;br&gt;&amp;gt;         show_message = True
&lt;br&gt;&amp;gt;         hover_help = True
&lt;br&gt;&amp;gt;         fields = [
&lt;br&gt;&amp;gt;             TextField('field1', label_text='Field1', size=6,
&lt;br&gt;&amp;gt; validator=NotEmpty,
&lt;br&gt;&amp;gt;                       help_text='Please enter a value'),
&lt;br&gt;&amp;gt;             TextField('field2', label_text='Field2')]
&lt;br&gt;&amp;gt;         submit_text = 'submit'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now, when I am not giving any value in field1 and clicking 'submit'
&lt;br&gt;&amp;gt; button, I get error like:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; TypeError: pylons_formencode_gettext() got an unexpected keyword
&lt;br&gt;&amp;gt; argument 'domain'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Ranjan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Dec 19, 8:07 pm, Michael Pedersen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mjpe...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; You state &amp;quot;The validation is not working&amp;quot;. What does that mean? Are data
&lt;br&gt;&amp;gt; &amp;gt; types failing to be converted? Is invalid data being accepted? Is valid data
&lt;br&gt;&amp;gt; &amp;gt; being rejected? Is the code simply giving a stack trace?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Without more information, we can't even guess. All we'll be able to do is
&lt;br&gt;&amp;gt; &amp;gt; say &amp;quot;Well, that kinda sucks.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; On Sat, Dec 19, 2009 at 6:00 AM, Ranjan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ranjan.n...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I am using turbogears2 (tg.devtools 2.0rc1). But whenever I am
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; submitting this form, the validation is not working. Needing help.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The sample code is given below:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; class MyForm(TableForm):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        show_message = True
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        fields = [
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;            TextField('field1', label_text='Field1', size=6,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; validator=NotEmpty),
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;            TextField('field1', label_text='Field1',
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; validator=NotEmpty)]
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        submit_text = 'submit'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; my_form = MyForm(&amp;quot;my_form&amp;quot;, action='save')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; class UserController(BaseController):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;    @expose('openads.templates.form')
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;    def test(self, **params):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        tmpl_context.form = my_form
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        return {}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;    @expose()
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;    @validate(my_form, error_handler=test)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;    def save(self, **params):
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        flash(&amp;quot;successfully saved...&amp;quot;)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;        redirect(&amp;quot;/&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; form template:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;lt;p py:replace=&amp;quot;tmpl_context.form()&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Ranjan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; To unsubscribe from this group, send email to
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears%2Bunsubscribe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; .
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; For more options, visit this group at
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;&lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt; &amp;gt; Michael J. Pedersen
&lt;br&gt;&amp;gt; &amp;gt; My IM IDs: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Jabber/peder...@...&lt;/a&gt;, ICQ/103345809, AIM/pedermj022171
&lt;br&gt;&amp;gt; &amp;gt;          Yahoo/pedermj2002, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MSN/pedermj022...@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884720&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Validation-in-tg2-tp26854178p26884720.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26884385</id>
	<title>Re: How to encrypt password</title>
	<published>2009-12-21T22:06:29Z</published>
	<updated>2009-12-21T22:06:29Z</updated>
	<author>
		<name>Ranjan-3</name>
	</author>
	<content type="html">Thanks Christoph
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Dec 22, 1:43 am, Christoph Zwerschke &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884385&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;c...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Am 21.12.2009 11:42 schrieb Ranjan:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In my change password method, I want to compare the user input
&lt;br&gt;&amp;gt; &amp;gt; password and the encrypted password stored in database.
&lt;br&gt;&amp;gt; &amp;gt; Needing help
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You can use the User.validate_password() method for this purpose. Have a
&lt;br&gt;&amp;gt; look at the User class in the file model/auth.py.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- Christoph
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884385&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26884385&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-encrypt-password-tp26842841p26884385.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26882890</id>
	<title>WebHelpers 1.0b2 released</title>
	<published>2009-12-21T17:51:50Z</published>
	<updated>2009-12-21T17:51:50Z</updated>
	<author>
		<name>Mike Orr-2</name>
	</author>
	<content type="html">WebHelpers 1.0b2 is released.
&lt;br&gt;&lt;br&gt;Feedgenerator is updated to the current Django original, and the
&lt;br&gt;GeoRSS classes added. &amp;nbsp;Please test it with your newsfeeds, including
&lt;br&gt;those using the 'published' property. &amp;nbsp;(The 'generator' and 'source'
&lt;br&gt;properties are still disabled until somebody can tell me what exactly
&lt;br&gt;they should be.)
&lt;br&gt;&lt;br&gt;I'm not sure about one aspect of the GeoRSS code. &amp;nbsp;It's putting the
&lt;br&gt;longitude first in the XML file, and I've heard contradictory things
&lt;br&gt;about whether it should. &amp;nbsp;Does anybody have Justin Bronn's email
&lt;br&gt;address, the author of the Django GIS code? &amp;nbsp;I emailed Jacob but he's
&lt;br&gt;out of town.
&lt;br&gt;&lt;br&gt;The other biggest change is in the HTML tag builder implementation.
&lt;br&gt;It passes the tests and works with my site, but let me know if you
&lt;br&gt;have any problems.
&lt;br&gt;&lt;br&gt;The deprecation of webhelpers.markdown has been canceled. The other
&lt;br&gt;changes to markdown() to make it work with other Markdown
&lt;br&gt;implementations remain.
&lt;br&gt;&lt;br&gt;Here's the full changelog since 0.6.4:
&lt;br&gt;&lt;br&gt;1.0b2 (2009-12-21)
&lt;br&gt;------------------
&lt;br&gt;* webhelpers.constants:
&lt;br&gt;&amp;nbsp; - Fix spelling of Massachusetts.
&lt;br&gt;* webhelpers.feedgenerator:
&lt;br&gt;&amp;nbsp; - Sync with Django rev 11910. This adds GeoRSS and makes the API more
&lt;br&gt;&amp;nbsp; &amp;nbsp; extensible, as well as fixing a few bugs.
&lt;br&gt;&amp;nbsp; &amp;nbsp; (Re-added the Atom1 'published' property.)
&lt;br&gt;&amp;nbsp; &amp;nbsp; (The 'generator' and 'source' properties were lost, but they weren't
&lt;br&gt;&amp;nbsp; &amp;nbsp; working correctly anyway.)
&lt;br&gt;&amp;nbsp; &amp;nbsp; GeoRSS usage: use the Geo\* classes and add &amp;nbsp;``geometry=(lat, lon)`` to
&lt;br&gt;&amp;nbsp; &amp;nbsp; each news item. Other shapes and a (not yet implemented) Geometry class are
&lt;br&gt;&amp;nbsp; &amp;nbsp; allowed; see the source.
&lt;br&gt;&amp;nbsp; &amp;nbsp; Note: you should specify the latitude first, but the longitude appears
&lt;br&gt;&amp;nbsp; &amp;nbsp; first in the newsfeed. &amp;nbsp;This is a feature, to comply with the spec.
&lt;br&gt;* webhelpers.html:
&lt;br&gt;&amp;nbsp; - New ``HTML.cdata()`` method for producing &amp;quot;&amp;lt;!![CDATA[ ... ]]&amp;gt;&amp;quot; sections.
&lt;br&gt;&amp;nbsp; - The basic tag builders (``HTML.a()`` and ``HTML.tag(&amp;quot;a&amp;quot;)``) now have a
&lt;br&gt;&amp;nbsp; &amp;nbsp; ``_nl`` arg which, if true, inserts a newline between content elements
&lt;br&gt;&amp;nbsp; &amp;nbsp; and at the end of the tag for readability. &amp;nbsp;Example:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTML.a(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, href=&amp;quot;/&amp;quot;) &amp;nbsp;=&amp;gt; &amp;nbsp; '&amp;lt;a href=&amp;quot;/&amp;quot;&amp;gt;AB&amp;lt;/a&amp;gt;'
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTML.a(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;, href=&amp;quot;/&amp;quot;, _nl=True) &amp;nbsp; =&amp;gt; &amp;nbsp; '&amp;lt;a href=&amp;quot;/&amp;quot;&amp;gt;\nA\nB\n&amp;lt;/a&amp;gt;\n'
&lt;br&gt;&amp;nbsp; &amp;nbsp; This does not affect HTML attributes nor the higher-level tag helpers.
&lt;br&gt;&amp;nbsp; &amp;nbsp; The exact spacing is subject to change. &amp;nbsp;The tag building code has been
&lt;br&gt;&amp;nbsp; &amp;nbsp; refactored to accommodate this.
&lt;br&gt;* webhelpers.html.tags:
&lt;br&gt;&amp;nbsp; - ``form()`` puts its hidden &amp;quot;_method&amp;quot; field in a '&amp;lt;div style=&amp;quot;display:none&amp;quot;&amp;gt;'
&lt;br&gt;&amp;nbsp; &amp;nbsp; to conform to XHTML syntax. The style prevents the div from being displayed
&lt;br&gt;&amp;nbsp; &amp;nbsp; or affecting the layout. A new arg ``hidden_fields`` may be a dict or
&lt;br&gt;&amp;nbsp; &amp;nbsp; iterable of additional hidden fields, which will be added to the div.
&lt;br&gt;&amp;nbsp; - Set magic ID attribute in ``hidden`` helper to match behavior of the other
&lt;br&gt;&amp;nbsp; &amp;nbsp; tag helpers.
&lt;br&gt;&amp;nbsp; - ``image()`` can now calculate the width and height automatically
&lt;br&gt;&amp;nbsp; &amp;nbsp; from an image file, using either the PIL algorithm or the pure Python
&lt;br&gt;&amp;nbsp; &amp;nbsp; algorithm in ``webhelpers.media``. It also logs the dimensions to the
&lt;br&gt;&amp;nbsp; &amp;nbsp; debug log for troubleshooting.
&lt;br&gt;* webhelpers.html.tools:
&lt;br&gt;&amp;nbsp; - Reimplement ``highlight()`` using the HTML builder. New arguments add
&lt;br&gt;&amp;nbsp; &amp;nbsp; flexibility. &amp;nbsp;Deprecate the ``highlighter`` argument, which creates tags
&lt;br&gt;&amp;nbsp; &amp;nbsp; via string interpolation.
&lt;br&gt;&amp;nbsp; - Fixed ``auto_link()`` to parse slash characters in query string.
&lt;br&gt;&amp;nbsp; &amp;nbsp; Patch by hanula; Bitbucket issue #10.
&lt;br&gt;&amp;nbsp; - Fix HTML overescaping and underescaping in auto_link(). &amp;nbsp;Patch by Marius
&lt;br&gt;&amp;nbsp; &amp;nbsp; Gedminas. &amp;nbsp;A parsing bug remains:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://pylonshq.com/project/pylonshq/ticket/657&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pylonshq.com/project/pylonshq/ticket/657&lt;/a&gt;&lt;br&gt;* webhelpers.markdown / webhelpers.html.converters:
&lt;br&gt;&amp;nbsp; - ``webhelpers.markdown`` will not be upgraded to the version 2 series but
&lt;br&gt;&amp;nbsp; &amp;nbsp; will remain at 1.7. Users who want the latest bugfixes and extensions
&lt;br&gt;&amp;nbsp; &amp;nbsp; should download the full Markdown package or the alternative Markdown2
&lt;br&gt;&amp;nbsp; &amp;nbsp; from PyPI.
&lt;br&gt;&amp;nbsp; - The ``markdown()`` helper in
&lt;br&gt;&amp;nbsp; &amp;nbsp; ``webhelpers.html.converters`` now has support for external Markdown
&lt;br&gt;&amp;nbsp; &amp;nbsp; implementations. You can pass a specific module via the ``markdown``
&lt;br&gt;&amp;nbsp; &amp;nbsp; argument, otherwise it will attempt to import ``markdown`` or fall back
&lt;br&gt;&amp;nbsp; &amp;nbsp; to ``webhelpers.markdown``.
&lt;br&gt;&amp;nbsp; - To see which version is autoloaded,
&lt;br&gt;&amp;nbsp; &amp;nbsp; call ``_get_markdown_module()`` and inspect the ``.__file__``,
&lt;br&gt;&amp;nbsp; &amp;nbsp; ``.version``, and/or ``.version_info`` attributes of the return value.
&lt;br&gt;* webhelpers.media:
&lt;br&gt;&amp;nbsp; - Bugfix in ``get_dimensions_pil``.
&lt;br&gt;* webhelpers.paginate:
&lt;br&gt;&amp;nbsp; - Change for SQLAlchemy 0.6. (bug #11)
&lt;br&gt;* webhelpers.pylonslib:
&lt;br&gt;&amp;nbsp; - Fix HTML overescaping. &amp;nbsp;Patch by Marius Gedminas.
&lt;br&gt;&lt;br&gt;&lt;br&gt;1.0b1 (2009-11-20)
&lt;br&gt;------------------
&lt;br&gt;* Delete deprecated subpackage: rails.
&lt;br&gt;&amp;nbsp; These are replaced by new helpers in date, html, misc, number, text.
&lt;br&gt;* Delete other deprecated subpackages: commands, hinclude, htmlgen, pagination.
&lt;br&gt;&amp;nbsp; Pagination is replaced by paginate.
&lt;br&gt;* webhelpers.constants:
&lt;br&gt;&amp;nbsp; - ``uk_counties`` returns tuples rather than lists.
&lt;br&gt;* webhelpers.feedgenerator:
&lt;br&gt;&amp;nbsp; - ``rfc3339_date`` now accepts date objects without crashing.
&lt;br&gt;&amp;nbsp; - Add 'generator' and 'source' properties to RSS2 feeds. Patch by
&lt;br&gt;&amp;nbsp; &amp;nbsp; Vince Spicer.
&lt;br&gt;&amp;nbsp; - Add 'published' property to Atom1 feeds.
&lt;br&gt;* webhelpers.html.converters:
&lt;br&gt;&amp;nbsp; - New helper ``render()`` formats HTML to text.
&lt;br&gt;&amp;nbsp; - New helper ``sanitize()`` strips HTML tags from user input.
&lt;br&gt;* webhelprs.html.tags:
&lt;br&gt;&amp;nbsp; - New helper ``css_classes()`` to add classes to a tag programmatically.
&lt;br&gt;&amp;nbsp; - Fix bug in tag helpers when passing 'id_' argument (although 'id' is
&lt;br&gt;&amp;nbsp; &amp;nbsp; recommended instead).
&lt;br&gt;&amp;nbsp; - Add OptionGroup class and optgroup support to select(). &amp;nbsp;Patch by
&lt;br&gt;&amp;nbsp; &amp;nbsp; Alexandre Bourget.
&lt;br&gt;* webhelpers.html.tools:
&lt;br&gt;&amp;nbsp; - New helper ``strip_tags()`` deletes HTML tags in a string.
&lt;br&gt;* webhelpers.paginate:
&lt;br&gt;&amp;nbsp; - Allow all versions of SQLAlchemy &amp;gt; 0.3.
&lt;br&gt;&amp;nbsp; - convert &amp;quot;_range&amp;quot; and &amp;quot;_pagelink&amp;quot; function to Page class method so that they
&lt;br&gt;&amp;nbsp; &amp;nbsp; can be overridden
&lt;br&gt;&amp;nbsp; - pager &amp;quot;onclick&amp;quot; argument use template string value. So, javascript code can
&lt;br&gt;&amp;nbsp; &amp;nbsp; use &amp;quot;partial_url&amp;quot; or &amp;quot;page&amp;quot; value or any. Backward compatibility is
&lt;br&gt;&amp;nbsp; &amp;nbsp; considered.
&lt;br&gt;&amp;nbsp; - Add presliced list option to avoid slicing when list is already.
&lt;br&gt;* webhelpers.pylonslib:
&lt;br&gt;&amp;nbsp; - is now a package.
&lt;br&gt;&amp;nbsp; - The ``Flash`` class now accepts severity categories, thanks to Wichert
&lt;br&gt;&amp;nbsp; &amp;nbsp; Akkerman. &amp;nbsp;The docstring shows how to set up auto-fading messages using
&lt;br&gt;&amp;nbsp; &amp;nbsp; Javascript a la Mac OSX's &amp;quot;Growl&amp;quot; feature. &amp;nbsp;This is backward compatible
&lt;br&gt;&amp;nbsp; &amp;nbsp; although you should delete existing sessions when upgrading from 0.6.x.
&lt;br&gt;&amp;nbsp; - ``webhelpers.pylonslib.minify`` contains enhanced versions of
&lt;br&gt;&amp;nbsp; &amp;nbsp; ``javascript_link`` and ``stylesheet_link`` to minify (shrink) files for
&lt;br&gt;&amp;nbsp; &amp;nbsp; more efficient transmission. &amp;nbsp;(EXPERIMENTAL: tests fail in
&lt;br&gt;&amp;nbsp; &amp;nbsp; unfinished/disabled_test_pylonslib_minify.py; see
&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://pylonshq.com/project/pylonshq/ticket/466&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pylonshq.com/project/pylonshq/ticket/466&lt;/a&gt;&amp;nbsp;.)
&lt;br&gt;* webhelpers.text:
&lt;br&gt;&amp;nbsp; - Port several helpers from Ruby's &amp;quot;stringex&amp;quot; package.
&lt;br&gt;&amp;nbsp; &amp;nbsp; + ``urlify()`` converts any string to a URL-friendly equivalent.
&lt;br&gt;&amp;nbsp; &amp;nbsp; + ``remove_formatting()``
&lt;br&gt;&amp;nbsp; &amp;nbsp; + If the ``unidecode`` package is installed, these two helpers will also
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; transliterate non-ASCII characters to their closest pronounciation
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; equvivalent in ASCII.
&lt;br&gt;&amp;nbsp; &amp;nbsp; + Four other helpers reduce HTML entities or whitespace.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Mike Orr &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26882890&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;sluggoster@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26882890&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26882890&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/WebHelpers-1.0b2-released-tp26882890p26882890.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26881719</id>
	<title>Re: Tg2.1: can't use dojo in tgAdmin</title>
	<published>2009-12-21T15:23:03Z</published>
	<updated>2009-12-21T15:23:03Z</updated>
	<author>
		<name>Antti Niinikoski</name>
	</author>
	<content type="html">It's probably the same issue as reported here
&lt;br&gt;&lt;a href=&quot;http://code.google.com/p/tgtools/issues/detail?id=24&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.google.com/p/tgtools/issues/detail?id=24&lt;/a&gt;&lt;br&gt;&lt;br&gt;I think there are more threads with the same problem as well
&lt;br&gt;&lt;a href=&quot;http://groups.google.com/group/turbogears/browse_thread/thread/66457fc5ac5f6857/e83b834d5b18dcb3?lnk=gst&amp;q=+tgext#e83b834d5b18dcb3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears/browse_thread/thread/66457fc5ac5f6857/e83b834d5b18dcb3?lnk=gst&amp;q=+tgext#e83b834d5b18dcb3&lt;/a&gt;&lt;br&gt;&lt;br&gt;Regards
&lt;br&gt;Antti
&lt;br&gt;&lt;br&gt;On Dec 21, 4:20 pm, khaezzar &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881719&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kha...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; using tgAdmin works well,
&lt;br&gt;&amp;gt; but when I install &amp;quot;tw.dojo&amp;quot; i can't view data in my Table (using
&lt;br&gt;&amp;gt; TableFiller and TableBase). I just get &amp;quot;No Records Found.&amp;quot; message.
&lt;br&gt;&amp;gt; even if i don't use dojo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I follow the tutorial :&lt;a href=&quot;http://www.turbogears.org/2.1/docs/main/Extensions/Admin/index.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.turbogears.org/2.1/docs/main/Extensions/Admin/index.html&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Install tw.dojo give me :
&lt;br&gt;&amp;gt; =======================================
&lt;br&gt;&amp;gt; (learning)maestro@lion:~/k007/my_projects_tg21/learning$ easy_install
&lt;br&gt;&amp;gt; tw.dojo
&lt;br&gt;&amp;gt; Searching for tw.dojo
&lt;br&gt;&amp;gt; Readinghttp://pypi.python.org/simple/tw.dojo/
&lt;br&gt;&amp;gt; Readinghttp://toscawidgets.org/
&lt;br&gt;&amp;gt; Readinghttp://toscawidgets.org/download
&lt;br&gt;&amp;gt; Best match: tw.dojo 0.9.8.1
&lt;br&gt;&amp;gt; Downloadinghttp://pypi.python.org/packages/source/t/tw.dojo/tw.dojo-0.9.8.1.tar....
&lt;br&gt;&amp;gt; Processing tw.dojo-0.9.8.1.tar.gz
&lt;br&gt;&amp;gt; Running tw.dojo-0.9.8.1/setup.py -q bdist_egg --dist-dir /tmp/
&lt;br&gt;&amp;gt; easy_install-cYEoK5/tw.dojo-0.9.8.1/egg-dist-tmp-Ms7l_v
&lt;br&gt;&amp;gt; Directory ./tw.dojo.egg-info ignored by pattern *.egg-info
&lt;br&gt;&amp;gt; File ./setup.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/__init__.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/chart.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/__init__.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/core.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/filepicker.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/menu.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/selectshuttle.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/release.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/data.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/dojo.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/tree.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/defaults.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/descriptions.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/dijit.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/grid.py ignored by pattern *.py
&lt;br&gt;&amp;gt; File ./tw/dojo/templates/__init__.py ignored by pattern *.py
&lt;br&gt;&amp;gt; Adding tw.dojo 0.9.8.1 to easy-install.pth file
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Installed /home/maestro/k007/my_projects_tg21/learning/lib/python2.6/
&lt;br&gt;&amp;gt; site-packages/tw.dojo-0.9.8.1-py2.6.egg
&lt;br&gt;&amp;gt; Processing dependencies for tw.dojo
&lt;br&gt;&amp;gt; Finished processing dependencies for tw.dojo
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; =======================================
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; any idea ?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; thanks.
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881719&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881719&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tg2.1%3A-can%27t-use-dojo-in-tgAdmin-tp26874602p26881719.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26881558</id>
	<title>Re: Possible to use without virtualenv</title>
	<published>2009-12-21T15:04:15Z</published>
	<updated>2009-12-21T15:04:15Z</updated>
	<author>
		<name>Christoph Zwerschke</name>
	</author>
	<content type="html">Am 21.12.2009 22:29 schrieb Todd Blanchard:
&lt;br&gt;&amp;gt; Because as far as I can tell, virtualenv doesn't work on snow leopard.
&lt;br&gt;&lt;br&gt;Yes, TG 1 and 2 are working fine without virtualenv. You only get 
&lt;br&gt;problems when you want to run TG apps based on different TG versions at 
&lt;br&gt;the same time.
&lt;br&gt;&lt;br&gt;-- Christoph
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881558&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26881558&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Possible-to-use-without-virtualenv-tp26880380p26881558.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26880380</id>
	<title>Possible to use without virtualenv</title>
	<published>2009-12-21T13:29:40Z</published>
	<updated>2009-12-21T13:29:40Z</updated>
	<author>
		<name>Todd Blanchard</name>
	</author>
	<content type="html">Because as far as I can tell, virtualenv doesn't work on snow leopard. &amp;nbsp;It gives:
&lt;br&gt;&lt;br&gt;virtualenv --no-site-packages tg2envNew python executable in tg2env/bin/python
&lt;br&gt;ERROR: The executable tg2env/bin/python is not functioning
&lt;br&gt;ERROR: It thinks sys.prefix is '/System/Library/Frameworks/Python.framework/Versions/2.6' (should be '/Users/dude/Projects/iParq/timepiece/tg2env')
&lt;br&gt;ERROR: virtualenv is not compatible with this system or executable
&lt;br&gt;[dude]~/Projects/iParq/timepiece&amp;gt;
&lt;br&gt;&lt;br&gt;Really stuck and frustrated.
&lt;br&gt;&lt;br&gt;-Todd Blanchard
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880380&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880380&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Possible-to-use-without-virtualenv-tp26880380p26880380.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26880324</id>
	<title>include my own java script into turbogears 2.0</title>
	<published>2009-12-21T13:25:21Z</published>
	<updated>2009-12-21T13:25:21Z</updated>
	<author>
		<name>tpnguyen</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Is it possible that I can include my own java script in Genshi
&lt;br&gt;template without writting ToscaWidgets?
&lt;br&gt;Here is what I have in my template but it does not seem to work. It
&lt;br&gt;does not pick up my script.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;lt;script src=&amp;quot;${tg.url('/public/javascript/mylayout.js')}&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
&lt;br&gt;&lt;br&gt;I am using TG 2.0. &amp;nbsp; &amp;nbsp;Is the above method only applicable in TG 1.0?
&lt;br&gt;btw, my /public directory resides at the same level as /conrollers and
&lt;br&gt;/templates directories.
&lt;br&gt;&lt;br&gt;thanks much in advance.
&lt;br&gt;Thang
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880324&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26880324&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/include-my-own-java-script-into-turbogears-2.0-tp26880324p26880324.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26879776</id>
	<title>Re: Re: How to encrypt password</title>
	<published>2009-12-21T12:43:46Z</published>
	<updated>2009-12-21T12:43:46Z</updated>
	<author>
		<name>Christoph Zwerschke</name>
	</author>
	<content type="html">Am 21.12.2009 11:42 schrieb Ranjan:
&lt;br&gt;&amp;gt; In my change password method, I want to compare the user input
&lt;br&gt;&amp;gt; password and the encrypted password stored in database.
&lt;br&gt;&amp;gt; Needing help
&lt;br&gt;&lt;br&gt;You can use the User.validate_password() method for this purpose. Have a 
&lt;br&gt;look at the User class in the file model/auth.py.
&lt;br&gt;&lt;br&gt;-- Christoph
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26879776&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26879776&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-encrypt-password-tp26842841p26879776.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26874602</id>
	<title>Tg2.1: can't use dojo in tgAdmin</title>
	<published>2009-12-21T06:20:57Z</published>
	<updated>2009-12-21T06:20:57Z</updated>
	<author>
		<name>khalid ezzaraoui</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;using tgAdmin works well,
&lt;br&gt;but when I install &amp;quot;tw.dojo&amp;quot; i can't view data in my Table (using
&lt;br&gt;TableFiller and TableBase). I just get &amp;quot;No Records Found.&amp;quot; message.
&lt;br&gt;even if i don't use dojo
&lt;br&gt;&lt;br&gt;I follow the tutorial :
&lt;br&gt;&lt;a href=&quot;http://www.turbogears.org/2.1/docs/main/Extensions/Admin/index.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.turbogears.org/2.1/docs/main/Extensions/Admin/index.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Install tw.dojo give me :
&lt;br&gt;=======================================
&lt;br&gt;(learning)maestro@lion:~/k007/my_projects_tg21/learning$ easy_install
&lt;br&gt;tw.dojo
&lt;br&gt;Searching for tw.dojo
&lt;br&gt;Reading &lt;a href=&quot;http://pypi.python.org/simple/tw.dojo/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/simple/tw.dojo/&lt;/a&gt;&lt;br&gt;Reading &lt;a href=&quot;http://toscawidgets.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://toscawidgets.org/&lt;/a&gt;&lt;br&gt;Reading &lt;a href=&quot;http://toscawidgets.org/download&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://toscawidgets.org/download&lt;/a&gt;&lt;br&gt;Best match: tw.dojo 0.9.8.1
&lt;br&gt;Downloading &lt;a href=&quot;http://pypi.python.org/packages/source/t/tw.dojo/tw.dojo-0.9.8.1.tar.gz#md5=20e6cad6d7e9057f767e57579821292a&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pypi.python.org/packages/source/t/tw.dojo/tw.dojo-0.9.8.1.tar.gz#md5=20e6cad6d7e9057f767e57579821292a&lt;/a&gt;&lt;br&gt;Processing tw.dojo-0.9.8.1.tar.gz
&lt;br&gt;Running tw.dojo-0.9.8.1/setup.py -q bdist_egg --dist-dir /tmp/
&lt;br&gt;easy_install-cYEoK5/tw.dojo-0.9.8.1/egg-dist-tmp-Ms7l_v
&lt;br&gt;Directory ./tw.dojo.egg-info ignored by pattern *.egg-info
&lt;br&gt;File ./setup.py ignored by pattern *.py
&lt;br&gt;File ./tw/__init__.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/chart.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/__init__.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/core.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/filepicker.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/menu.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/selectshuttle.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/release.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/data.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/dojo.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/tree.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/defaults.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/descriptions.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/dijit.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/grid.py ignored by pattern *.py
&lt;br&gt;File ./tw/dojo/templates/__init__.py ignored by pattern *.py
&lt;br&gt;Adding tw.dojo 0.9.8.1 to easy-install.pth file
&lt;br&gt;&lt;br&gt;Installed /home/maestro/k007/my_projects_tg21/learning/lib/python2.6/
&lt;br&gt;site-packages/tw.dojo-0.9.8.1-py2.6.egg
&lt;br&gt;Processing dependencies for tw.dojo
&lt;br&gt;Finished processing dependencies for tw.dojo
&lt;br&gt;&lt;br&gt;=======================================
&lt;br&gt;&lt;br&gt;any idea ?
&lt;br&gt;&lt;br&gt;thanks.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26874602&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26874602&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tg2.1%3A-can%27t-use-dojo-in-tgAdmin-tp26874602p26874602.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26872272</id>
	<title>Re: How to encrypt password</title>
	<published>2009-12-21T02:42:03Z</published>
	<updated>2009-12-21T02:42:03Z</updated>
	<author>
		<name>Ranjan-3</name>
	</author>
	<content type="html">In my change password method, I want to compare the user input
&lt;br&gt;password and the encrypted password stored in database.
&lt;br&gt;Needing help
&lt;br&gt;&lt;br&gt;On Dec 18, 5:47 pm, Christoph Zwerschke &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26872272&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;c...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Am 18.12.2009 13:43 schrieb Ranjan:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; In TG 1, I was using the following code to encrypt the user given
&lt;br&gt;&amp;gt; &amp;gt; password identity.encrypt_password(data['pwd'])
&lt;br&gt;&amp;gt; &amp;gt; In TG2, need help to use like that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The setter method in the default auth.py model file already does that
&lt;br&gt;&amp;gt; for you automatically if you store a user password, and you can modify
&lt;br&gt;&amp;gt; the encryption method there as you like.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- Christoph
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26872272&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26872272&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-encrypt-password-tp26842841p26872272.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26871309</id>
	<title>Re: Struck trying to install on Snow Leopard</title>
	<published>2009-12-21T00:53:53Z</published>
	<updated>2009-12-21T00:53:53Z</updated>
	<author>
		<name>Diez B. Roggisch</name>
	</author>
	<content type="html">Todd Blanchard schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; First, the virtualenv script seems broken. &amp;nbsp;I asked in the virtualenv
&lt;br&gt;&amp;gt; group and they say it needs to be regenerated or something. &amp;nbsp;It
&lt;br&gt;&amp;gt; generates the following error:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; python tg2-bootstrap.py --no-site-packages tg2env
&lt;br&gt;&amp;gt; New python executable in tg2env/bin/python
&lt;br&gt;&amp;gt; ERROR: The executable tg2env/bin/python is not functioning
&lt;br&gt;&amp;gt; ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
&lt;br&gt;&amp;gt; Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
&lt;br&gt;&amp;gt; tg2env')
&lt;br&gt;&amp;gt; ERROR: virtualenv is not compatible with this system or executable
&lt;br&gt;&amp;gt; [todd]~/Projects/iParq&amp;gt;sudo python tg2-bootstrap.py --no-site-packages
&lt;br&gt;&amp;gt; tg2env
&lt;br&gt;&amp;gt; Password:
&lt;br&gt;&amp;gt; New python executable in tg2env/bin/python
&lt;br&gt;&amp;gt; ERROR: The executable tg2env/bin/python is not functioning
&lt;br&gt;&amp;gt; ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
&lt;br&gt;&amp;gt; Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
&lt;br&gt;&amp;gt; tg2env')
&lt;br&gt;&amp;gt; ERROR: virtualenv is not compatible with this system or executable
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So fine - I try the manual setup instead. &amp;nbsp;I successfully create the
&lt;br&gt;&amp;gt; virtualenv and activate it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Then run the easy_install script
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; easy_install -i &lt;a href=&quot;http://www.turbogears.org/2.0/downloads/current/index&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.turbogears.org/2.0/downloads/current/index&lt;/a&gt;&lt;br&gt;&amp;gt; tg.devtools
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; and it chugs for awhile and then dies with
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;&amp;gt; setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py&amp;quot;, line
&lt;br&gt;&amp;gt; 919, in run_setup
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;&amp;gt; setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 62, in
&lt;br&gt;&amp;gt; run_setup
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;&amp;gt; setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 105, in run
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;&amp;gt; setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 64, in
&lt;br&gt;&amp;gt; &amp;lt;lambda&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; File &amp;quot;setup.py&amp;quot;, line 4, in &amp;lt;module&amp;gt;
&lt;br&gt;&amp;gt; ImportError: No module named ez_setup
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So what am I doing wrong?
&lt;/div&gt;&lt;br&gt;I think you somehow managed to botch your python installation. And 
&lt;br&gt;whatever keeps virtualenv from working kills your installation as well. 
&lt;br&gt;So I'd suggest you try &amp; fix python itself, and make VE running.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Diez
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26871309&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26871309&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Struck-trying-to-install-on-Snow-Leopard-tp26867349p26871309.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26870650</id>
	<title>Re: TG2 mako templates and preprocessor</title>
	<published>2009-12-20T23:21:38Z</published>
	<updated>2009-12-20T23:21:38Z</updated>
	<author>
		<name>Jose Galvez-2</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
  &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
Thanks I'll create a ticket, as for Genshi, don't know I've not looked
into it all that much, I just like Mako, but I'll take a look at Genshi
and see how it compares&lt;br&gt;
Jose&lt;br&gt;
&lt;br&gt;
Christoph Zwerschke wrote:
&lt;blockquote cite=&quot;mid:4B2DFFC9.3010807@online.de&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;Jose, you should create a trac ticket for this.

Btw, why don't you use Genshi in the first place if you want to have 
something that plays well with html editors and IDEs? If performance is 
really an issue, I wouldn't use a preprocessor.

-- Christoph


Am 20.12.2009 08:09 schrieb Jose Galvez:
  &lt;/pre&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;pre wrap=&quot;&quot;&gt;anyone considering adding these changes to make tg2 mako preprocessor
friendly?
    &lt;/pre&gt;
  &lt;/blockquote&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;!----&gt;
--

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.
To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870650&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870650&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
For more options, visit this group at &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.



  &lt;/pre&gt;
&lt;/blockquote&gt;
&lt;/body&gt;
&lt;/html&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870650&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870650&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TG2-mako-templates-and-preprocessor-tp26821174p26870650.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26870566</id>
	<title>Re: Validation in tg2</title>
	<published>2009-12-20T23:02:33Z</published>
	<updated>2009-12-20T23:02:33Z</updated>
	<author>
		<name>Ranjan-3</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&amp;nbsp;I have changed the 'MyForm' slightly as follows:
&lt;br&gt;&lt;br&gt;class MyForm(TableForm):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show_message = True
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; hover_help = True
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fields = [
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextField('field1', label_text='Field1', size=6,
&lt;br&gt;validator=NotEmpty,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; help_text='Please enter a value'),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextField('field2', label_text='Field2')]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; submit_text = 'submit'
&lt;br&gt;&lt;br&gt;Now, when I am not giving any value in field1 and clicking 'submit'
&lt;br&gt;button, I get error like:
&lt;br&gt;&lt;br&gt;TypeError: pylons_formencode_gettext() got an unexpected keyword
&lt;br&gt;argument 'domain'
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Ranjan
&lt;br&gt;&lt;br&gt;On Dec 19, 8:07 pm, Michael Pedersen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mjpe...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You state &amp;quot;The validation is not working&amp;quot;. What does that mean? Are data
&lt;br&gt;&amp;gt; types failing to be converted? Is invalid data being accepted? Is valid data
&lt;br&gt;&amp;gt; being rejected? Is the code simply giving a stack trace?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Without more information, we can't even guess. All we'll be able to do is
&lt;br&gt;&amp;gt; say &amp;quot;Well, that kinda sucks.&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Sat, Dec 19, 2009 at 6:00 AM, Ranjan &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ranjan.n...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hi All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I am using turbogears2 (tg.devtools 2.0rc1). But whenever I am
&lt;br&gt;&amp;gt; &amp;gt; submitting this form, the validation is not working. Needing help.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The sample code is given below:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; class MyForm(TableForm):
&lt;br&gt;&amp;gt; &amp;gt;        show_message = True
&lt;br&gt;&amp;gt; &amp;gt;        fields = [
&lt;br&gt;&amp;gt; &amp;gt;            TextField('field1', label_text='Field1', size=6,
&lt;br&gt;&amp;gt; &amp;gt; validator=NotEmpty),
&lt;br&gt;&amp;gt; &amp;gt;            TextField('field1', label_text='Field1',
&lt;br&gt;&amp;gt; &amp;gt; validator=NotEmpty)]
&lt;br&gt;&amp;gt; &amp;gt;        submit_text = 'submit'
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; my_form = MyForm(&amp;quot;my_form&amp;quot;, action='save')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; class UserController(BaseController):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;    @expose('openads.templates.form')
&lt;br&gt;&amp;gt; &amp;gt;    def test(self, **params):
&lt;br&gt;&amp;gt; &amp;gt;        tmpl_context.form = my_form
&lt;br&gt;&amp;gt; &amp;gt;        return {}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;    @expose()
&lt;br&gt;&amp;gt; &amp;gt;    @validate(my_form, error_handler=test)
&lt;br&gt;&amp;gt; &amp;gt;    def save(self, **params):
&lt;br&gt;&amp;gt; &amp;gt;        flash(&amp;quot;successfully saved...&amp;quot;)
&lt;br&gt;&amp;gt; &amp;gt;        redirect(&amp;quot;/&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; form template:
&lt;br&gt;&amp;gt; &amp;gt; &amp;lt;p py:replace=&amp;quot;tmpl_context.form()&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt; Ranjan
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups
&lt;br&gt;&amp;gt; &amp;gt; &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;&amp;gt; &amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe from this group, send email to
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears%2Bunsubscribe@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; .
&lt;br&gt;&amp;gt; &amp;gt; For more options, visit this group at
&lt;br&gt;&amp;gt; &amp;gt;&lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; Michael J. Pedersen
&lt;br&gt;&amp;gt; My IM IDs: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Jabber/peder...@...&lt;/a&gt;, ICQ/103345809, AIM/pedermj022171
&lt;br&gt;&amp;gt;          Yahoo/pedermj2002, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;MSN/pedermj022...@...&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26870566&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Validation-in-tg2-tp26854178p26870566.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26867349</id>
	<title>Struck trying to install on Snow Leopard</title>
	<published>2009-12-20T12:46:22Z</published>
	<updated>2009-12-20T12:46:22Z</updated>
	<author>
		<name>Todd Blanchard</name>
	</author>
	<content type="html">First, the virtualenv script seems broken. &amp;nbsp;I asked in the virtualenv
&lt;br&gt;group and they say it needs to be regenerated or something. &amp;nbsp;It
&lt;br&gt;generates the following error:
&lt;br&gt;&lt;br&gt;python tg2-bootstrap.py --no-site-packages tg2env
&lt;br&gt;New python executable in tg2env/bin/python
&lt;br&gt;ERROR: The executable tg2env/bin/python is not functioning
&lt;br&gt;ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
&lt;br&gt;Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
&lt;br&gt;tg2env')
&lt;br&gt;ERROR: virtualenv is not compatible with this system or executable
&lt;br&gt;[todd]~/Projects/iParq&amp;gt;sudo python tg2-bootstrap.py --no-site-packages
&lt;br&gt;tg2env
&lt;br&gt;Password:
&lt;br&gt;New python executable in tg2env/bin/python
&lt;br&gt;ERROR: The executable tg2env/bin/python is not functioning
&lt;br&gt;ERROR: It thinks sys.prefix is '/System/Library/Frameworks/
&lt;br&gt;Python.framework/Versions/2.6' (should be '/Users/todd/Projects/iParq/
&lt;br&gt;tg2env')
&lt;br&gt;ERROR: virtualenv is not compatible with this system or executable
&lt;br&gt;&lt;br&gt;So fine - I try the manual setup instead. &amp;nbsp;I successfully create the
&lt;br&gt;virtualenv and activate it.
&lt;br&gt;&lt;br&gt;Then run the easy_install script
&lt;br&gt;&lt;br&gt;easy_install -i &lt;a href=&quot;http://www.turbogears.org/2.0/downloads/current/index&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.turbogears.org/2.0/downloads/current/index&lt;/a&gt;&lt;br&gt;tg.devtools
&lt;br&gt;&lt;br&gt;and it chugs for awhile and then dies with
&lt;br&gt;&lt;br&gt;&amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;setuptools-0.6c11-py2.6.egg/setuptools/command/easy_install.py&amp;quot;, line
&lt;br&gt;919, in run_setup
&lt;br&gt;&amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 62, in
&lt;br&gt;run_setup
&lt;br&gt;&amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 105, in run
&lt;br&gt;&amp;nbsp; File &amp;quot;/Users/todd/Projects/iParq/tg2env/lib/python2.6/site-packages/
&lt;br&gt;setuptools-0.6c11-py2.6.egg/setuptools/sandbox.py&amp;quot;, line 64, in
&lt;br&gt;&amp;lt;lambda&amp;gt;
&lt;br&gt;&amp;nbsp; File &amp;quot;setup.py&amp;quot;, line 4, in &amp;lt;module&amp;gt;
&lt;br&gt;ImportError: No module named ez_setup
&lt;br&gt;&lt;br&gt;So what am I doing wrong?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867349&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867349&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Struck-trying-to-install-on-Snow-Leopard-tp26867349p26867349.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26862369</id>
	<title>Re: TG2 mako templates and preprocessor</title>
	<published>2009-12-20T02:43:21Z</published>
	<updated>2009-12-20T02:43:21Z</updated>
	<author>
		<name>Christoph Zwerschke</name>
	</author>
	<content type="html">Jose, you should create a trac ticket for this.
&lt;br&gt;&lt;br&gt;Btw, why don't you use Genshi in the first place if you want to have 
&lt;br&gt;something that plays well with html editors and IDEs? If performance is 
&lt;br&gt;really an issue, I wouldn't use a preprocessor.
&lt;br&gt;&lt;br&gt;-- Christoph
&lt;br&gt;&lt;br&gt;&lt;br&gt;Am 20.12.2009 08:09 schrieb Jose Galvez:
&lt;br&gt;&amp;gt; anyone considering adding these changes to make tg2 mako preprocessor
&lt;br&gt;&amp;gt; friendly?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862369&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862369&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TG2-mako-templates-and-preprocessor-tp26821174p26862369.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26862071</id>
	<title>Re: SingleSelectField Widget</title>
	<published>2009-12-20T01:53:44Z</published>
	<updated>2009-12-20T01:53:44Z</updated>
	<author>
		<name>Diez B. Roggisch</name>
	</author>
	<content type="html">The answer is &amp;quot;child_args&amp;quot;. Please Read the docs, there is a section &amp;nbsp;
&lt;br&gt;devoted to that.
&lt;br&gt;&lt;br&gt;Diez
&lt;br&gt;&lt;br&gt;Am 20.12.2009 um 05:37 schrieb Michael Pearce &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862071&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;mgpearce48@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any toscawidget gurus out there?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I'm using a TableForm with a SingleSelectField widget with TG2. Can &amp;nbsp;
&lt;br&gt;&amp;gt; someone please advise how I can update the SingleSelectField options &amp;nbsp;
&lt;br&gt;&amp;gt; parameter when the page is displayed. I have no problem adding the &amp;nbsp;
&lt;br&gt;&amp;gt; options parameter when the widget is initialised, however I need to &amp;nbsp;
&lt;br&gt;&amp;gt; update the select control dropdown list based on user selection. How &amp;nbsp;
&lt;br&gt;&amp;gt; can this be done?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Michael
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google &amp;nbsp;
&lt;br&gt;&amp;gt; Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862071&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862071&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt; 
&lt;br&gt;&amp;gt; .
&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; .
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862071&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26862071&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SingleSelectField-Widget-tp26860984p26862071.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26861459</id>
	<title>Re: TG2 mako templates and preprocessor</title>
	<published>2009-12-19T23:04:27Z</published>
	<updated>2009-12-19T23:04:27Z</updated>
	<author>
		<name>Jose Galvez-2</name>
	</author>
	<content type="html">anyone considering adding these changes to make tg2 mako preprocessor 
&lt;br&gt;friendly?
&lt;br&gt;&lt;br&gt;jj.galvez wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; hi I wasn't sure where to post this so I'm putting it here. &amp;nbsp;I really
&lt;br&gt;&amp;gt; like Mako, however the &amp;lt;% syntax doesn't seem to play nicely with html
&lt;br&gt;&amp;gt; editors, or IDE's like eclipse, so I though I would apply a mako
&lt;br&gt;&amp;gt; preprocessor to change the mako syntax a little so essentually
&lt;br&gt;&amp;gt; replacing &amp;lt;%something with &amp;lt;mako:something . Its a very simple
&lt;br&gt;&amp;gt; preprocessor. &amp;nbsp;Now to use the preprocoessor I had to subclass
&lt;br&gt;&amp;gt; AppConfig to override setup_mako_render to add the preprocessor to the
&lt;br&gt;&amp;gt; DottedTemplateLookup method. &amp;nbsp;However to do that I either had to
&lt;br&gt;&amp;gt; subclass DottedTemplateLookup or change the default one. &amp;nbsp;I opted to
&lt;br&gt;&amp;gt; change the default one because I think being able to supply mako with
&lt;br&gt;&amp;gt; a preprocessor is an important mako function that's currently not
&lt;br&gt;&amp;gt; supported well in tg2.
&lt;br&gt;&amp;gt; My changes to dottednamesupport.py are as follows (which do not seem
&lt;br&gt;&amp;gt; to change the default behavior)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I hope this or something like it makes it into the next version of tg2
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; *** dottednamesupport - old.py	2009-12-16 16:14:31.000000000 -0800
&lt;br&gt;&amp;gt; --- dottednamesupport.py	2009-12-16 16:34:08.000000000 -0800
&lt;br&gt;&amp;gt; ***************
&lt;br&gt;&amp;gt; *** 36,42 ****
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; def __init__(self, input_encoding, output_encoding,
&lt;br&gt;&amp;gt; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imports, default_filters):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.input_encoding = input_encoding
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.output_encoding = output_encoding
&lt;br&gt;&amp;gt; --- 36,42 ----
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; def __init__(self, input_encoding, output_encoding,
&lt;br&gt;&amp;gt; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imports, default_filters, preprocessor=None):
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.input_encoding = input_encoding
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.output_encoding = output_encoding
&lt;br&gt;&amp;gt; ***************
&lt;br&gt;&amp;gt; *** 46,51 ****
&lt;br&gt;&amp;gt; --- 46,52 ----
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.template_cache = dict()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # implement a cache for the filename lookups
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.template_filenames_cache = dict()
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.preprocessor=preprocessor
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # a mutex to ensure thread safeness during template loading
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self._mutex = threading.Lock()
&lt;br&gt;&amp;gt; ***************
&lt;br&gt;&amp;gt; *** 138,144 ****
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output_encoding=self.output_encoding,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default_filters=self.default_filters,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imports=self.imports,
&lt;br&gt;&amp;gt; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lookup=self)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.template_cache[filename]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --- 139,146 ----
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; output_encoding=self.output_encoding,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; default_filters=self.default_filters,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; imports=self.imports,
&lt;br&gt;&amp;gt; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lookup=self,
&lt;br&gt;&amp;gt; ! &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; preprocessor=self.preprocessor)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return self.template_cache[filename]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861459&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861459&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861459&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26861459&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TG2-mako-templates-and-preprocessor-tp26821174p26861459.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26860984</id>
	<title>SingleSelectField Widget</title>
	<published>2009-12-19T20:37:48Z</published>
	<updated>2009-12-19T20:37:48Z</updated>
	<author>
		<name>Michael Pearce</name>
	</author>
	<content type="html">&lt;div&gt;Hi,&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Any toscawidget gurus out there?&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;I&amp;#39;m using a TableForm with a SingleSelectField widget with TG2. Can someone please advise how I can update the SingleSelectField options parameter when the page is displayed. I have no problem adding the options parameter when the widget is initialised, however I need to update the select control dropdown list based on user selection. How can this be done?&lt;/div&gt;

&lt;div&gt; &lt;/div&gt;
&lt;div&gt;Thanks,&lt;/div&gt;
&lt;div&gt;Michael&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26860984&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26860984&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/SingleSelectField-Widget-tp26860984p26860984.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26867339</id>
	<title>TG Admin too slow</title>
	<published>2009-12-19T10:55:09Z</published>
	<updated>2009-12-19T10:55:09Z</updated>
	<author>
		<name>Mauro Ciancio</name>
	</author>
	<content type="html">Hello everyone,
&lt;br&gt;&lt;br&gt;&amp;nbsp; I've developed an app using tg 2.0 and it uses the admin frontend to
&lt;br&gt;do the
&lt;br&gt;CRUD stuff.
&lt;br&gt;&amp;nbsp; The problem is that the interface is too slow, I mean, it takes
&lt;br&gt;about 25~30
&lt;br&gt;seconds to load and not only the first time. Every time that I switch
&lt;br&gt;to another
&lt;br&gt;model takes the same time.
&lt;br&gt;&amp;nbsp; I've used wireshark to see what was happening and I realized that
&lt;br&gt;the browser
&lt;br&gt;reloads in every request all the css and the js files. These js are
&lt;br&gt;from the
&lt;br&gt;dojo library and sprox widgets.
&lt;br&gt;&amp;nbsp; I'd like to know if there's a workaround to solve this or if I'm
&lt;br&gt;doing something
&lt;br&gt;wrong.
&lt;br&gt;&amp;nbsp; When the browser request one of my own css, it sends the 'if-
&lt;br&gt;modified-since'
&lt;br&gt;header and the server response 'not modified'. But, with dojo and
&lt;br&gt;sprox js
&lt;br&gt;this doesn't happens.
&lt;br&gt;&lt;br&gt;Any ideas?
&lt;br&gt;Cheers,
&lt;br&gt;Mauro Ciancio.
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867339&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26867339&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/TG-Admin-too-slow-tp26867339p26867339.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26855897</id>
	<title>Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-19T07:30:04Z</published>
	<updated>2009-12-19T07:30:04Z</updated>
	<author>
		<name>Mike C. Fletcher-2</name>
	</author>
	<content type="html">AF wrote:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API. &amp;nbsp; &amp;nbsp;I would
&lt;br&gt;&amp;gt; like to do short-term (10 mins.) caching of the results returned, as
&lt;br&gt;&amp;gt; many of the same calls are made rapidly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Found docs at:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;a href=&quot;http://turbogears.org/2.1/docs/main/Caching.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://turbogears.org/2.1/docs/main/Caching.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Is the current version.
&lt;br&gt;&amp;gt; However, the docs mention that I can't call the &amp;quot;expensive&amp;quot; function
&lt;br&gt;&amp;gt; with any args. &amp;nbsp; In my case, the call must take a number of request-
&lt;br&gt;&amp;gt; dependant arguments.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;Beaker has a two-level cache, you can cache any arbitrarily pickle-able
&lt;br&gt;object in the cache[x] at the key [y] using the code shown in the 2.1
&lt;br&gt;docs. &amp;nbsp;Encode the parameters in a canonical format into a unique
&lt;br&gt;(string) key and use that as the sub-key for the cache. &amp;nbsp;That works with
&lt;br&gt;2.0 as well (we use it extensively in one customer's application). &amp;nbsp;Note
&lt;br&gt;that pickles are not secure, so only trusted processes should be allowed
&lt;br&gt;to write to your cache (i.e. memcached must be heavily fire-walled if
&lt;br&gt;you're going to use that as your beaker back-end).
&lt;br&gt;&lt;br&gt;HTH,
&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;________________________________________________
&lt;br&gt;&amp;nbsp; Mike C. Fletcher
&lt;br&gt;&amp;nbsp; Designer, VR Plumber, Coder
&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://www.vrplumber.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.vrplumber.com&lt;/a&gt;&lt;br&gt;&amp;nbsp; &lt;a href=&quot;http://blog.vrplumber.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://blog.vrplumber.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855897&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855897&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26855897.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26855735</id>
	<title>Re: Validation in tg2</title>
	<published>2009-12-19T07:07:13Z</published>
	<updated>2009-12-19T07:07:13Z</updated>
	<author>
		<name>Michael Pedersen</name>
	</author>
	<content type="html">You state &amp;quot;The validation is not working&amp;quot;. What does that mean? Are data types failing to be converted? Is invalid data being accepted? Is valid data being rejected? Is the code simply giving a stack trace?&lt;br&gt;&lt;br&gt;
Without more information, we can&amp;#39;t even guess. All we&amp;#39;ll be able to do is say &amp;quot;Well, that kinda sucks.&amp;quot;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Sat, Dec 19, 2009 at 6:00 AM, Ranjan &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ranjan.naik@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;Hi All,&lt;br&gt;
&lt;br&gt;
I am using turbogears2 (tg.devtools 2.0rc1). But whenever I am&lt;br&gt;
submitting this form, the validation is not working. Needing help.&lt;br&gt;
&lt;br&gt;
The sample code is given below:&lt;br&gt;
&lt;br&gt;
class MyForm(TableForm):&lt;br&gt;
        show_message = True&lt;br&gt;
        fields = [&lt;br&gt;
            TextField(&amp;#39;field1&amp;#39;, label_text=&amp;#39;Field1&amp;#39;, size=6,&lt;br&gt;
validator=NotEmpty),&lt;br&gt;
            TextField(&amp;#39;field1&amp;#39;, label_text=&amp;#39;Field1&amp;#39;,&lt;br&gt;
validator=NotEmpty)]&lt;br&gt;
        submit_text = &amp;#39;submit&amp;#39;&lt;br&gt;
&lt;br&gt;
my_form = MyForm(&amp;quot;my_form&amp;quot;, action=&amp;#39;save&amp;#39;)&lt;br&gt;
&lt;br&gt;
class UserController(BaseController):&lt;br&gt;
&lt;br&gt;
    @expose(&amp;#39;openads.templates.form&amp;#39;)&lt;br&gt;
    def test(self, **params):&lt;br&gt;
        tmpl_context.form = my_form&lt;br&gt;
        return {}&lt;br&gt;
&lt;br&gt;
    @expose()&lt;br&gt;
    @validate(my_form, error_handler=test)&lt;br&gt;
    def save(self, **params):&lt;br&gt;
        flash(&amp;quot;successfully saved...&amp;quot;)&lt;br&gt;
        redirect(&amp;quot;/&amp;quot;)&lt;br&gt;
&lt;br&gt;
form template:&lt;br&gt;
&amp;lt;p py:replace=&amp;quot;tmpl_context.form()&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
Ranjan&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;
--&lt;br&gt;
&lt;br&gt;
You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.&lt;br&gt;
To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br&gt;
To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears%2Bunsubscribe@...&lt;/a&gt;.&lt;br&gt;
For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Michael J. Pedersen&lt;br&gt;My IM IDs: Jabber/&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pedersen@...&lt;/a&gt;, ICQ/103345809, AIM/pedermj022171&lt;br&gt;          Yahoo/pedermj2002, MSN/&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pedermj022171@...&lt;/a&gt;&lt;br&gt;
&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855735&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Validation-in-tg2-tp26854178p26855735.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26855667</id>
	<title>Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-19T07:00:16Z</published>
	<updated>2009-12-19T07:00:16Z</updated>
	<author>
		<name>Diez B. Roggisch</name>
	</author>
	<content type="html">AF schrieb:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API. &amp;nbsp; &amp;nbsp;I would
&lt;br&gt;&amp;gt; like to do short-term (10 mins.) caching of the results returned, as
&lt;br&gt;&amp;gt; many of the same calls are made rapidly.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Found docs at:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, the docs mention that I can't call the &amp;quot;expensive&amp;quot; function
&lt;br&gt;&amp;gt; with any args. &amp;nbsp; In my case, the call must take a number of request-
&lt;br&gt;&amp;gt; dependant arguments.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What should I do?
&lt;/div&gt;&lt;br&gt;Use one of the various memoized-caching-decorators for your API-call. 
&lt;br&gt;Recipes can be found on ASPN.
&lt;br&gt;&lt;br&gt;Diez
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855667&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26855667&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26855667.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26854178</id>
	<title>Validation in tg2</title>
	<published>2009-12-19T03:00:59Z</published>
	<updated>2009-12-19T03:00:59Z</updated>
	<author>
		<name>Ranjan-3</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;I am using turbogears2 (tg.devtools 2.0rc1). But whenever I am
&lt;br&gt;submitting this form, the validation is not working. Needing help.
&lt;br&gt;&lt;br&gt;The sample code is given below:
&lt;br&gt;&lt;br&gt;class MyForm(TableForm):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; show_message = True
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fields = [
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextField('field1', label_text='Field1', size=6,
&lt;br&gt;validator=NotEmpty),
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TextField('field1', label_text='Field1',
&lt;br&gt;validator=NotEmpty)]
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; submit_text = 'submit'
&lt;br&gt;&lt;br&gt;my_form = MyForm(&amp;quot;my_form&amp;quot;, action='save')
&lt;br&gt;&lt;br&gt;class UserController(BaseController):
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @expose('openads.templates.form')
&lt;br&gt;&amp;nbsp; &amp;nbsp; def test(self, **params):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmpl_context.form = my_form
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return {}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; @expose()
&lt;br&gt;&amp;nbsp; &amp;nbsp; @validate(my_form, error_handler=test)
&lt;br&gt;&amp;nbsp; &amp;nbsp; def save(self, **params):
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flash(&amp;quot;successfully saved...&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; redirect(&amp;quot;/&amp;quot;)
&lt;br&gt;&lt;br&gt;form template:
&lt;br&gt;&amp;lt;p py:replace=&amp;quot;tmpl_context.form()&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Ranjan
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26854178&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26854178&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Validation-in-tg2-tp26854178p26854178.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26849693</id>
	<title>Re: Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T12:55:36Z</published>
	<updated>2009-12-18T12:55:36Z</updated>
	<author>
		<name>Kevin Horn</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 18, 2009 at 2:53 PM, Kevin Horn &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevin.horn@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div class=&quot;im&quot;&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 18, 2009 at 2:06 PM, AF &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fowler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;

Kevin,&lt;br&gt;
&lt;br&gt;
On Dec 18, 2:01 pm, Kevin Horn &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevin.h...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&amp;gt; On Fri, Dec 18, 2009 at 12:52 PM, AF &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fow...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API.    I would&lt;br&gt;
&amp;gt; &amp;gt; like to do short-term (10 mins.) caching of the results returned, as&lt;br&gt;
&amp;gt; &amp;gt; many of the same calls are made rapidly.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Found docs at:&lt;br&gt;
&amp;gt; &amp;gt;&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; However, the docs mention that I can&amp;#39;t call the &amp;quot;expensive&amp;quot; function&lt;br&gt;
&amp;gt; &amp;gt; with any args.   In my case, the call must take a number of request-&lt;br&gt;
&amp;gt; &amp;gt; dependant arguments.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; What should I do?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; :)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I don&amp;#39;t think I understand what your problem is...does the second example of&lt;br&gt;
&amp;gt; @beaker_cache in the section &amp;quot;Using the cache decorator&amp;quot; on the page you&lt;br&gt;
&amp;gt; linked not do what you want?&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;If am understanding the docs, that will cache an entire page view.&lt;br&gt;
Not what I need.&lt;br&gt;
&lt;br&gt;
I just need to cache one or two calls from within my controller, but&lt;br&gt;
from what I can tell, the pylons cache demands an &amp;quot;argument-less&amp;quot;&lt;br&gt;
call.&lt;br&gt;
&lt;br&gt;
Am I understanding the docs right?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;Let&amp;#39;s try that again...Gmail seems to have sent my mail early...&lt;div class=&quot;im&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Ah, I see now.&lt;br&gt;&lt;br&gt;According to the Pylons docs here:&lt;br&gt;
&lt;a href=&quot;http://pylonshq.com/docs/en/0.9.7/caching/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://pylonshq.com/docs/en/0.9.7/caching/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;it looks like you are correct, the expensive function cannot have any&lt;br&gt;arguments.&lt;br&gt;&lt;br&gt;However, there are a couple of ways around this.&lt;br&gt;&lt;br&gt;1. You could wrap your expensive function in a argumentless function, and&lt;br&gt;

store the args someplace else.  Then have your argument-less function get&lt;br&gt;&lt;/div&gt;the args from wherever you stored them and call you expensive function.  You&amp;#39;d also need a function to generate a uniqe key for each set of args.&lt;div class=&quot;im&quot;&gt;
&lt;br&gt;
&lt;br&gt;Modifying the example, something like:&lt;br&gt;&lt;br&gt;class Example(TurboGearsController):&lt;br&gt;&lt;br&gt;&lt;/div&gt;    self.tempargs = []&lt;div class=&quot;im&quot;&gt;&lt;br&gt;&lt;br&gt;    def _expensive(self, *args):&lt;br&gt;        # do something expensive&lt;br&gt;        return value&lt;br&gt;
&lt;br&gt;&lt;/div&gt;
    def _argless_wrapper(self):&lt;br&gt;        return self._expensive(self.tempargs)&lt;br&gt;        &lt;br&gt;    def key_func(self, *args):&lt;br&gt;        # generate a key based on your args&lt;br&gt;        return key&lt;br&gt;&lt;br&gt;    @expose()&lt;br&gt;
    def index(self, *args):&lt;br&gt;
        self.tempargs = args&lt;div class=&quot;im&quot;&gt;&lt;br&gt;        c = cache.get_cache(&amp;quot;example_cache&amp;quot;)&lt;br&gt;&lt;/div&gt;        x = c.get_value(key=key_func(*args),&lt;br&gt;                        createfunc=self._argless_wrapper,&lt;br&gt;
                        type=&amp;quot;memory&amp;quot;,&lt;br&gt;
                        expiretime=3600)&lt;br&gt;&lt;br&gt;2. Just memoize the expensive function, just like you would if you weren&amp;#39;t doing anything with a web framework.  In other words, don&amp;#39;t use the beaker cache at all.  Google for &amp;quot;python memoize&amp;quot; and you&amp;#39;ll find a bunch of recipes, decorators, etc. which might make this easier for you.  Most of them probably won&amp;#39;t let you expire things based on a time limit, but you could probably adapt them to do so if you really needed to.  I would probably go this route.  Here&amp;#39;s a couple of links:&lt;br&gt;

&lt;br&gt;&lt;a href=&quot;http://code.activestate.com/recipes/52201/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://code.activestate.com/recipes/52201/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://code.activestate.com/recipes/498110/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://code.activestate.com/recipes/498110/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;Hope this helps!&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;Kevin Horn&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Also, note that if you use option 2 above, you&amp;#39;ll have to do something to make sure the &amp;quot;cache&amp;quot; is shared between threads.  This should be handled automatically if you used the Beaker cache.&lt;br&gt;
&lt;br&gt;Kevin Horn&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849693&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26849693.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26849612</id>
	<title>Re: Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T12:53:54Z</published>
	<updated>2009-12-18T12:53:54Z</updated>
	<author>
		<name>Kevin Horn</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 18, 2009 at 2:06 PM, AF &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849612&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fowler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Kevin,&lt;br&gt;
&lt;br&gt;
On Dec 18, 2:01 pm, Kevin Horn &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849612&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevin.h...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&amp;gt; On Fri, Dec 18, 2009 at 12:52 PM, AF &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849612&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fow...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API.    I would&lt;br&gt;
&amp;gt; &amp;gt; like to do short-term (10 mins.) caching of the results returned, as&lt;br&gt;
&amp;gt; &amp;gt; many of the same calls are made rapidly.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Found docs at:&lt;br&gt;
&amp;gt; &amp;gt;&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; However, the docs mention that I can&amp;#39;t call the &amp;quot;expensive&amp;quot; function&lt;br&gt;
&amp;gt; &amp;gt; with any args.   In my case, the call must take a number of request-&lt;br&gt;
&amp;gt; &amp;gt; dependant arguments.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; What should I do?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; :)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I don&amp;#39;t think I understand what your problem is...does the second example of&lt;br&gt;
&amp;gt; @beaker_cache in the section &amp;quot;Using the cache decorator&amp;quot; on the page you&lt;br&gt;
&amp;gt; linked not do what you want?&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;If am understanding the docs, that will cache an entire page view.&lt;br&gt;
Not what I need.&lt;br&gt;
&lt;br&gt;
I just need to cache one or two calls from within my controller, but&lt;br&gt;
from what I can tell, the pylons cache demands an &amp;quot;argument-less&amp;quot;&lt;br&gt;
call.&lt;br&gt;
&lt;br&gt;
Am I understanding the docs right?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;Let&amp;#39;s try that again...Gmail seems to have sent my mail early...&lt;br&gt;&lt;br&gt;&lt;br&gt;Ah, I see now.&lt;br&gt;&lt;br&gt;According to the Pylons docs here:&lt;br&gt;&lt;a href=&quot;http://pylonshq.com/docs/en/0.9.7/caching/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pylonshq.com/docs/en/0.9.7/caching/&lt;/a&gt;&lt;br&gt;
&lt;br&gt;it looks like you are correct, the expensive function cannot have any&lt;br&gt;arguments.&lt;br&gt;&lt;br&gt;However, there are a couple of ways around this.&lt;br&gt;&lt;br&gt;1. You could wrap your expensive function in a argumentless function, and&lt;br&gt;
store the args someplace else.  Then have your argument-less function get&lt;br&gt;the args from wherever you stored them and call you expensive function.  You&amp;#39;d also need a function to generate a uniqe key for each set of args.&lt;br&gt;
&lt;br&gt;Modifying the example, something like:&lt;br&gt;&lt;br&gt;class Example(TurboGearsController):&lt;br&gt;&lt;br&gt;    self.tempargs = []&lt;br&gt;&lt;br&gt;    def _expensive(self, *args):&lt;br&gt;        # do something expensive&lt;br&gt;        return value&lt;br&gt;&lt;br&gt;
    def _argless_wrapper(self):&lt;br&gt;        return self._expensive(self.tempargs)&lt;br&gt;        &lt;br&gt;    def key_func(self, *args):&lt;br&gt;        # generate a key based on your args&lt;br&gt;        return key&lt;br&gt;&lt;br&gt;    @expose()&lt;br&gt;    def index(self, *args):&lt;br&gt;
        self.tempargs = args&lt;br&gt;        c = cache.get_cache(&amp;quot;example_cache&amp;quot;)&lt;br&gt;        x = c.get_value(key=key_func(*args),&lt;br&gt;                        createfunc=self._argless_wrapper,&lt;br&gt;                        type=&amp;quot;memory&amp;quot;,&lt;br&gt;
                        expiretime=3600)&lt;br&gt;&lt;br&gt;2. Just memoize the expensive function, just like you would if you weren&amp;#39;t doing anything with a web framework.  In other words, don&amp;#39;t use the beaker cache at all.  Google for &amp;quot;python memoize&amp;quot; and you&amp;#39;ll find a bunch of recipes, decorators, etc. which might make this easier for you.  Most of them probably won&amp;#39;t let you expire things based on a time limit, but you could probably adapt them to do so if you really needed to.  I would probably go this route.  Here&amp;#39;s a couple of links:&lt;br&gt;
&lt;br&gt;&lt;a href=&quot;http://code.activestate.com/recipes/52201/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.activestate.com/recipes/52201/&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://code.activestate.com/recipes/498110/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://code.activestate.com/recipes/498110/&lt;/a&gt;&lt;br&gt;&lt;br&gt;Hope this helps!&lt;br&gt;
&lt;br&gt;Kevin Horn&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849612&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849612&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26849612.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26849593</id>
	<title>Re: Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T12:44:18Z</published>
	<updated>2009-12-18T12:44:18Z</updated>
	<author>
		<name>Kevin Horn</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 18, 2009 at 2:06 PM, AF &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849593&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fowler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Kevin,&lt;br&gt;
&lt;br&gt;
On Dec 18, 2:01 pm, Kevin Horn &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849593&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevin.h...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&amp;gt; On Fri, Dec 18, 2009 at 12:52 PM, AF &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849593&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fow...@...&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;
&amp;gt; &amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API.    I would&lt;br&gt;
&amp;gt; &amp;gt; like to do short-term (10 mins.) caching of the results returned, as&lt;br&gt;
&amp;gt; &amp;gt; many of the same calls are made rapidly.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Found docs at:&lt;br&gt;
&amp;gt; &amp;gt;&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; However, the docs mention that I can&amp;#39;t call the &amp;quot;expensive&amp;quot; function&lt;br&gt;
&amp;gt; &amp;gt; with any args.   In my case, the call must take a number of request-&lt;br&gt;
&amp;gt; &amp;gt; dependant arguments.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; What should I do?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; :)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I don&amp;#39;t think I understand what your problem is...does the second example of&lt;br&gt;
&amp;gt; @beaker_cache in the section &amp;quot;Using the cache decorator&amp;quot; on the page you&lt;br&gt;
&amp;gt; linked not do what you want?&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;If am understanding the docs, that will cache an entire page view.&lt;br&gt;
Not what I need.&lt;br&gt;
&lt;br&gt;
I just need to cache one or two calls from within my controller, but&lt;br&gt;
from what I can tell, the pylons cache demands an &amp;quot;argument-less&amp;quot;&lt;br&gt;
call.&lt;br&gt;
&lt;br&gt;
Am I understanding the docs right?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;Ah, I see now.&lt;br&gt;&lt;br&gt;According to the Pylons docs here:&lt;br&gt;&lt;a href=&quot;http://pylonshq.com/docs/en/0.9.7/caching/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://pylonshq.com/docs/en/0.9.7/caching/&lt;/a&gt;&lt;br&gt;&lt;br&gt;it looks like you are correct, the expensive function cannot have any arguments.&lt;br&gt;
&lt;br&gt;However, there are a couple of ways around this.&lt;br&gt;&lt;br&gt;1. You could wrap your expensive function in a argumentless function, and store the args someplace else.  Then have your argument-less function get the args from wherever you stored them and call you expensive function.&lt;br&gt;
&lt;br&gt;Modifying the example, something like:&lt;br&gt;&lt;br&gt;class Example(TurboGearsController):&lt;br&gt;&lt;br&gt;    def _expensive(self, *args):&lt;br&gt;        # do something expensive&lt;br&gt;        return value&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;    @expose()&lt;br&gt;    def index(self):&lt;br&gt;
        c = cache.get_cache(&amp;quot;example_cache&amp;quot;)&lt;br&gt;        x = c.get_value(key=&amp;quot;my key&amp;quot;,&lt;br&gt;                        createfunc=self._expensive,&lt;br&gt;                        type=&amp;quot;memory&amp;quot;,&lt;br&gt;                        expiretime=3600)&lt;br&gt;
&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849593&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26849593&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26849593.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26848974</id>
	<title>Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T12:06:07Z</published>
	<updated>2009-12-18T12:06:07Z</updated>
	<author>
		<name>allen.fowler</name>
	</author>
	<content type="html">Kevin,
&lt;br&gt;&lt;br&gt;On Dec 18, 2:01 pm, Kevin Horn &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848974&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;kevin.h...@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Fri, Dec 18, 2009 at 12:52 PM, AF &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848974&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fow...@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I have a &amp;quot;slow&amp;quot; call in my controller to an external API. &amp;nbsp; &amp;nbsp;I would
&lt;br&gt;&amp;gt; &amp;gt; like to do short-term (10 mins.) caching of the results returned, as
&lt;br&gt;&amp;gt; &amp;gt; many of the same calls are made rapidly.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Found docs at:
&lt;br&gt;&amp;gt; &amp;gt;&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; However, the docs mention that I can't call the &amp;quot;expensive&amp;quot; function
&lt;br&gt;&amp;gt; &amp;gt; with any args. &amp;nbsp; In my case, the call must take a number of request-
&lt;br&gt;&amp;gt; &amp;gt; dependant arguments.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; What should I do?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Thanks,
&lt;br&gt;&amp;gt; &amp;gt; :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I don't think I understand what your problem is...does the second example of
&lt;br&gt;&amp;gt; @beaker_cache in the section &amp;quot;Using the cache decorator&amp;quot; on the page you
&lt;br&gt;&amp;gt; linked not do what you want?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;If am understanding the docs, that will cache an entire page view.
&lt;br&gt;Not what I need.
&lt;br&gt;&lt;br&gt;I just need to cache one or two calls from within my controller, but
&lt;br&gt;from what I can tell, the pylons cache demands an &amp;quot;argument-less&amp;quot;
&lt;br&gt;call.
&lt;br&gt;&lt;br&gt;Am I understanding the docs right?
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848974&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848974&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26848974.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26848067</id>
	<title>Re: Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T11:01:12Z</published>
	<updated>2009-12-18T11:01:12Z</updated>
	<author>
		<name>Kevin Horn</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 18, 2009 at 12:52 PM, AF &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848067&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;allen.fowler@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hello,&lt;br&gt;
&lt;br&gt;
I have a &amp;quot;slow&amp;quot; call in my controller to an external API.    I would&lt;br&gt;
like to do short-term (10 mins.) caching of the results returned, as&lt;br&gt;
many of the same calls are made rapidly.&lt;br&gt;
&lt;br&gt;
Found docs at:&lt;br&gt;
&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
However, the docs mention that I can&amp;#39;t call the &amp;quot;expensive&amp;quot; function&lt;br&gt;
with any args.   In my case, the call must take a number of request-&lt;br&gt;
dependant arguments.&lt;br&gt;
&lt;br&gt;
What should I do?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
:)&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;&lt;/font&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;I don&amp;#39;t think I understand what your problem is...does the second example of @beaker_cache in the section &amp;quot;Using the cache decorator&amp;quot; on the page you linked not do what you want?&lt;br&gt;
&lt;br&gt;Kevin Horn&lt;br&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;

You received this message because you are subscribed to the Google Groups &quot;TurboGears&quot; group.&lt;br /&gt;

To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848067&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.&lt;br /&gt;

To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26848067&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.&lt;br /&gt;

For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.&lt;br /&gt;

</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26848067.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26847963</id>
	<title>Arbitrary caching in TG2.1?</title>
	<published>2009-12-18T10:52:00Z</published>
	<updated>2009-12-18T10:52:00Z</updated>
	<author>
		<name>allen.fowler</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I have a &amp;quot;slow&amp;quot; call in my controller to an external API. &amp;nbsp; &amp;nbsp;I would
&lt;br&gt;like to do short-term (10 mins.) caching of the results returned, as
&lt;br&gt;many of the same calls are made rapidly.
&lt;br&gt;&lt;br&gt;Found docs at:
&lt;br&gt;&lt;a href=&quot;http://docs.turbogears.org/2.0/Caching&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.turbogears.org/2.0/Caching&lt;/a&gt;&lt;br&gt;&lt;br&gt;However, the docs mention that I can't call the &amp;quot;expensive&amp;quot; function
&lt;br&gt;with any args. &amp;nbsp; In my case, the call must take a number of request-
&lt;br&gt;dependant arguments.
&lt;br&gt;&lt;br&gt;What should I do?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;:)
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26847963&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26847963&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Arbitrary-caching-in-TG2.1--tp26847963p26847963.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26842892</id>
	<title>Re: How to encrypt password</title>
	<published>2009-12-18T04:47:23Z</published>
	<updated>2009-12-18T04:47:23Z</updated>
	<author>
		<name>Christoph Zwerschke</name>
	</author>
	<content type="html">Am 18.12.2009 13:43 schrieb Ranjan:
&lt;br&gt;&amp;gt; In TG 1, I was using the following code to encrypt the user given
&lt;br&gt;&amp;gt; password identity.encrypt_password(data['pwd'])
&lt;br&gt;&amp;gt; In TG2, need help to use like that.
&lt;br&gt;&lt;br&gt;The setter method in the default auth.py model file already does that 
&lt;br&gt;for you automatically if you store a user password, and you can modify 
&lt;br&gt;the encryption method there as you like.
&lt;br&gt;&lt;br&gt;-- Christoph
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26842892&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26842892&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-encrypt-password-tp26842841p26842892.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26842841</id>
	<title>How to encrypt password</title>
	<published>2009-12-18T04:43:18Z</published>
	<updated>2009-12-18T04:43:18Z</updated>
	<author>
		<name>Ranjan-3</name>
	</author>
	<content type="html">Hi All,
&lt;br&gt;&lt;br&gt;In TG 1, I was using the following code to encrypt the user given
&lt;br&gt;password
&lt;br&gt;identity.encrypt_password(data['pwd'])
&lt;br&gt;&lt;br&gt;In TG2, need help to use like that.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Ranjan
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26842841&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26842841&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-encrypt-password-tp26842841p26842841.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26832146</id>
	<title>Re: How to know whether I'm being run through the WSGI  stack?</title>
	<published>2009-12-17T09:51:14Z</published>
	<updated>2009-12-17T09:51:14Z</updated>
	<author>
		<name>Antoine Pitrou</name>
	</author>
	<content type="html">&lt;br&gt;&amp;gt; I think your only chance then is to have your own config-module thingy that 
&lt;br&gt;&amp;gt; you import in model/__init__.py, and check for a certain variable being set.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you are in the commandline tool code, make sure you import this module 
&lt;br&gt;&amp;gt; *first*, alter the setting, and *then* import model-code.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I agree though that it really sounds like a bad idea. What is the actual 
&lt;br&gt;&amp;gt; problem you try to solve with that?
&lt;br&gt;&lt;br&gt;I wanted to change SQLAlchemy session settings slightly: namely, set the
&lt;br&gt;autoflush flag to False when running batch jobs (it has been noticed to
&lt;br&gt;speed up my scripts by 2x or 3x).
&lt;br&gt;&lt;br&gt;I would have preferred not to take the risk to break the controllers by
&lt;br&gt;doing so, but I finally took it :-) (the model itself is covered by unit
&lt;br&gt;tests)
&lt;br&gt;&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832146&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26832146&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-know-whether-I%27m-being-run-through-the-WSGI--stack--tp26831065p26832146.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26831777</id>
	<title>Re: How to know whether I'm being run through the WSGI   stack?</title>
	<published>2009-12-17T09:27:46Z</published>
	<updated>2009-12-17T09:27:46Z</updated>
	<author>
		<name>Diez B. Roggisch</name>
	</author>
	<content type="html">On Thursday 17 December 2009 18:04:22 Antoine Pitrou wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Le jeudi 17 décembre 2009 à 11:54 -0500, Michael Pedersen a écrit :
&lt;br&gt;&amp;gt; &amp;gt; This sounds like a not very good idea, honestly. Putting such logic
&lt;br&gt;&amp;gt; &amp;gt; into your model seems like it becomes a way to break your model easily
&lt;br&gt;&amp;gt; &amp;gt; from another program.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Well, the model isn't intended to be called from another program. It's
&lt;br&gt;&amp;gt; just an application plus a bunch of admin scripts tied to the
&lt;br&gt;&amp;gt; application.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; However, if you insist on doing so, you should be able to examine the
&lt;br&gt;&amp;gt; &amp;gt; current request, and use that to tell if you're coming from inside a
&lt;br&gt;&amp;gt; &amp;gt; web request or being run from the command line.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I need to detect this when model/__init__.py is being imported. I don't
&lt;br&gt;&amp;gt; think there's any &amp;quot;current request&amp;quot; existing at the moment, even when
&lt;br&gt;&amp;gt; launched through a Web server.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;I think your only chance then is to have your own config-module thingy that 
&lt;br&gt;you import in model/__init__.py, and check for a certain variable being set.
&lt;br&gt;&lt;br&gt;If you are in the commandline tool code, make sure you import this module 
&lt;br&gt;*first*, alter the setting, and *then* import model-code.
&lt;br&gt;&lt;br&gt;I agree though that it really sounds like a bad idea. What is the actual 
&lt;br&gt;problem you try to solve with that?
&lt;br&gt;&lt;br&gt;Diez
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;&lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;TurboGears&amp;quot; group.
&lt;br&gt;To post to this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831777&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears@...&lt;/a&gt;.
&lt;br&gt;To unsubscribe from this group, send email to &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26831777&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;turbogears+unsubscribe@...&lt;/a&gt;.
&lt;br&gt;For more options, visit this group at &lt;a href=&quot;http://groups.google.com/group/turbogears?hl=en&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://groups.google.com/group/turbogears?hl=en&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-know-whether-I%27m-being-run-through-the-WSGI--stack--tp26831065p26831777.html" />
</entry>

</feed>
