Beaker caching in a view callable defined as a class in Pyramid

2011-02-04 Thread Victor Fernandez de Alba
Hi! There's a way to make Beaker work inside a view callable defined as a class? For example: from beaker.cache import cache_region @view_config(name="demo.html", renderer='epi:templates/mytemplate.pt') class demoView(object): def __init__(self,context,request): """ """

Re: Beaker caching in a view callable defined as a class in Pyramid

2011-02-04 Thread Daniel Holth
cache_key = " ".join(map(str, deco_args + args)) One way is to define a __str__ method for your class that doesn't include the object's id() -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@goog

Re: Beaker caching in a view callable defined as a class in Pyramid

2011-02-04 Thread Victor Fernandez de Alba
Great!! Just added: def __str__(self): return "%s.%s" % (self.__module__, self.__class__.__name__) Works like a charm. Thanks, V. PD: However, maybe it's worth to document it in the pyramid_beaker docs... On 4 Feb 2011, at 15:13, Daniel Holth wrote: > cache_key = " ".join(map(str,

RapidGiza 0.2 released

2011-02-04 Thread Rocky Burt
RapidGiza is a set of Paster templates that provide out of the box: * An application based on the Pyramid_ web application framework * Default SQLAlchemy_ engine/session-factory setup * All ``.jinja2`` files matched as Jinja2_ templates * Khufu-Script_ setup for running the app in devel