Re: formencode 1.2.2 and the hidden _method field

2010-03-31 Thread Ian Wilson
http://formencode.org/modules/htmlfill.html#formencode.htmlfill.render The keyword argument force_defaults=True will remove values from the html that are not given in the defaults dictionary. Maybe this is what you were experiencing? On Mar 31, 2:29 am, Mike Burrows wrote: > Hi, > > Has anyone

correct use of cache.region_invalidate

2010-03-31 Thread Dave
I'm using beaker caching for several db heavy steps in my controllers, which I invalidate when updates are made. Something like this: def get_stuff(id): @cache.region('longterm', 'get_stuff') def get(id): return BigComplexDatabaseThing(id) return customize_for_request(get(id))

Re: format_data_size helper

2010-03-31 Thread Mike Orr
On Wed, Mar 31, 2010 at 11:55 AM, Marius Gedminas wrote: > On Wed, Mar 31, 2010 at 08:26:57AM -0700, Mike Orr wrote: >> On Wed, Mar 31, 2010 at 6:45 AM, Marius Gedminas wrote: >> > I was left wondering about one thing: what would this print: >> > >> >  >>> format_byte_size(1, full_name=True) >> >

Re: format_data_size helper

2010-03-31 Thread Marius Gedminas
On Wed, Mar 31, 2010 at 08:26:57AM -0700, Mike Orr wrote: > On Wed, Mar 31, 2010 at 6:45 AM, Marius Gedminas wrote: > > I was left wondering about one thing: what would this print: > > > >  >>> format_byte_size(1, full_name=True) > > > > '1.0 bytes'? > > Actually it prints '1 bytes'. > > I tried

Re: format_data_size helper

2010-03-31 Thread Mike Orr
On Wed, Mar 31, 2010 at 6:45 AM, Marius Gedminas wrote: > I was left wondering about one thing: what would this print: > >  >>> format_byte_size(1, full_name=True) > > '1.0 bytes'? Actually it prints '1 bytes'. I tried to add a singular case but it made the functions significantly more complex f

Re: format_data_size helper

2010-03-31 Thread Marius Gedminas
On Tue, Mar 30, 2010 at 08:40:05PM -0700, Mike Orr wrote: > The format_data_size helper is implemented in WebHelpers tip. This is > the successor to number_to_human_size, and converts an int/float to > kilobytes etc. ``webhelpers.number.format_data_size()`` is the > generic formatter, and ``forma

formencode 1.2.2 and the hidden _method field

2010-03-31 Thread Mike Burrows
Hi, Has anyone seen formencode turn to ? After a lot of head-scratching (a lot of wasted time looking at webhelpers) we reverted from 1.2.2 to 1.2.1 and the problem went away. Are we doing something wrong? Thanks, Mike m...@asplake.co.uk http://positiveincline.com http://twitter.com/as