Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Carlos de la Guardia
Have you any particular features in mind? Carlos de la Guardia On Fri, Aug 28, 2015 at 9:07 PM, Mike Orr wrote: > On Fri, Aug 28, 2015 at 6:46 PM, Paul Everitt > wrote: > > A couple of months ago I was talking again with Shane Hathaway about my > endless interest in the ZODB experience, outsid

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Mike Orr
On Fri, Aug 28, 2015 at 6:46 PM, Paul Everitt wrote: > A couple of months ago I was talking again with Shane Hathaway about my > endless interest in the ZODB experience, outside of the ZODB, even if it > means restricted to PostgreSQL 9.4+. He gave me a recursive CTE that would do > “traversal”

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Paul Everitt
> On Aug 28, 2015, at 9:22 PM, Mike Orr wrote: > > On Fri, Aug 28, 2015 at 3:01 AM, Petr Blahos wrote: > On Fri, Aug 28, 2015 at 9:54 AM, Mehdi wrote: >>> Consider this url: >>> http://mysite.com/customers/137/orders?year=2015&month=5 >>> Now in pyramid traversal mechanism, how many queries wi

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Mike Orr
On Fri, Aug 28, 2015 at 6:22 PM, Mike Orr wrote: > On Fri, Aug 28, 2015 at 3:01 AM, Petr Blahos wrote: > The advantage of doing individual-record queries ("/customers/137") is > that I can properly raise KeyError if the record doesn't exist. Another advantage is I can have object-related methods

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Mike Orr
On Fri, Aug 28, 2015 at 3:01 AM, Petr Blahos wrote: On Fri, Aug 28, 2015 at 9:54 AM, Mehdi wrote: >> Consider this url: >> http://mysite.com/customers/137/orders?year=2015&month=5 >> Now in pyramid traversal mechanism, how many queries will be run against >> database? >> I guess it would be three

Re: [pylons-discuss] deform lipstick

2015-08-28 Thread Carlos de la Guardia
This might at least give you some ideas: https://github.com/ericrasmussen/deform_retail_demo/blob/master/deformretail/templates/home.mako Carlos de la Guardia On Fri, Aug 28, 2015 at 6:21 PM, Kurt Bendl wrote: > Hola, > > I've been using deform and colander to render forms for internal apps he

[pylons-discuss] deform lipstick

2015-08-28 Thread Kurt Bendl
Hola, I've been using deform and colander to render forms for internal apps here at work for the past couple of years. It works just fine for the utility apps I've been doing in-house. The pre-registration form I'm pulling together has about 40 fields that I want to break up into 6 sections. I

Re: [pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Petr Blahos
Hi Mehdi, traversing your resource tree does not necessarily mean running any queries. In your example, it wouldn't have to run any queries at all. Basically, it is there to bring you to the view and possibly gather some information on the way. For example (simplified and certainly not working):

[pylons-discuss] Traversal and extra round trip to db

2015-08-28 Thread Mehdi
Hi Let's get straight to my question: Consider this url: *http://mysite.com/customers/137/orders?year=2015&month=5* Now in pyramid traversal mechanism, how many queries will be run against database? I guess it would be three: 1. */customers* : select * from customers 2