On my Pyramid project I've been using this general concept -- which
i've used in the past :

- everything on the '/account' uses SqlAlchemy objects and hits the
database
- everything on the rest of the site uses cached data that is
assembled and in a dict format.  this stuff is periodically refreshed.

My issue / concern :

I've been enjoying using SqlAlchemy objects to plan out the 'public'
view.
The problem is that there's a lot of switching needed between:
     object.id
     to
     object['id']

I really don't want to do that.  I'd rather just have the backend
switch out the data-type.

I figured I could just change the dict into a class that inherits from
dict, and overrides __getattr__

That works fine, except when I introduce Beaker

I could probably store a normal dict and turn it into an Objectified
Dict on every request, but I'm wondering if there's a better idea .
Anyone ?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to