Re: pyramid_sqla 1.0rc1 released

2011-01-28 Thread Michael Merickel
I see a 'directory' parameter documented in add_static_route(), however the actual implementation doesn't seem to support it. The whole add_static_route() idea is a nice backward-compatible feature with pylons but I feel like it takes away from some of the features pyramid provides, like the

Re: pyramid_sqla 1.0rc1 released

2011-01-28 Thread Mike Orr
On Fri, Jan 28, 2011 at 1:28 AM, Michael Merickel mmeri...@gmail.com wrote: I see a 'directory' parameter documented in add_static_route(), however the actual implementation doesn't seem to support it. The whole add_static_route() idea is a nice backward-compatible feature with pylons but I

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Rocky Burt
I know I've plugged this project before but it seemed relevant to bring up again. I've built Khufu-SQLAHelper to enable what I decided was a best practice to setting up SQLAlchemy in a pyramid project. Daniel Holth and I went back and forth on this a bunch and I think we're mostly in

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Daniel Holth
stucco_auth's the approach includes: 1. SQLAlchemy session is only available as request.db (as far as stucco_auth is concerned). 2. Transaction management. No .commit() or .rollback() in view code. 3. Each package has its own declarative_base() and its own versioned schema It has no paster

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Michael Merickel
Is there a reason that a pyramid_sqla template does not add 'pyramid_sqla' as a dependency of the generated project, considering that the project is doing imports from the pyramid_sqla package? Michael On Thu, Jan 27, 2011 at 2:36 PM, Daniel Holth dho...@gmail.com wrote: stucco_auth's the

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Michael Merickel
Also, is there a reason that the template creates websetup.py as well as scripts/create_db.py? I see that create_db.py is documented, so websetup.py must just be there as an example of how to do it? Michael On Thu, Jan 27, 2011 at 8:06 PM, Michael Merickel mmeri...@gmail.comwrote: Is there a

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Mike Orr
On Thu, Jan 27, 2011 at 6:06 PM, Michael Merickel mmeri...@gmail.com wrote: Is there a reason that a pyramid_sqla template does not add 'pyramid_sqla' as a dependency of the generated project, considering that the project is doing imports from the pyramid_sqla package? Oh, that makes sense. It

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Mike Orr
On Thu, Jan 27, 2011 at 9:32 PM, Michael Merickel mich...@merickel.org wrote: I'll also point out that the create_db script should probably be initialized with your app's name instead of SimpleDemo in the line:     app = get_app(ini_file, SimpleDemo) Thanks for the replies! Michael Hmm, I

pyramid_sqla 1.0rc1 released

2011-01-26 Thread Mike Orr
pyramid_sqla is now in release candidate status. If I don't hear of any bugs over the next week I'll release the final. 1.0rc1 (2010-01-26) * ‘pyramid_sqla’ application template supports commit veto feature in repoze.tm2 1.0b1. * Add production.ini to application template. * Delete

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Daniel Holth
Why bother wrapping sqlalchemy.engine_from_config? That part seems to take up most of the code in add_engine(), but when a user has an oddball database they have to read and understand the wrapper before they can stop using it. This particular issue was a sore point for me using Pylons'

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Mike Orr
On Wed, Jan 26, 2011 at 6:35 AM, Daniel Holth dho...@gmail.com wrote: Why bother wrapping sqlalchemy.engine_from_config? That part seems to take up most of the code in add_engine(), but when a user has an oddball database they have to read and understand the wrapper before they can stop using

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Daniel Holth
Thanks Mike. Thought at least one person should give you the feedback you asked for. I must confess I only read your source code and skipped the documentation. You may consider stucco_auth's demo application as a counterargument to the pyramid_sqla design although you could use both packages

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Chris McDonough
Not sure how much speed is a concern, but the StaticViewPredicate here: class StaticViewPredicate(object): def __init__(self, package, subdir): self.package = package self.subdir = subdir def __call__(self, info, request): import logging log =

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Mike Orr
On Wed, Jan 26, 2011 at 12:54 PM, Chris McDonough chr...@plope.com wrote: Not sure how much speed is a concern, but the StaticViewPredicate here: class StaticViewPredicate(object):    def __init__(self, package, subdir):        self.package = package        self.subdir = subdir    def

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Mike Orr
On Wed, Jan 26, 2011 at 12:31 PM, Daniel Holth dho...@gmail.com wrote: I actually do have to use two database engines that do not participate in the same transaction (so I cannot use Session(binds={})). Instead, each database has its own configured session factory. (Upper-case Session is the

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Mike Orr
On Wed, Jan 26, 2011 at 12:54 PM, Chris McDonough chr...@plope.com wrote: Also, FWIW, I'd (reverting my prior arguments to the contrary, which I already did here: https://github.com/Pylons/pyramid/issues/closed#issue/44) consider making models a package What do others think? I initially

Re: pyramid_sqla 1.0rc1 released

2011-01-26 Thread Eric Rasmussen
I am working on a Pyramid app and just moved it over to pyramid_sqla. It makes sense to have it as a package because it offers a lot more than just initializing the database. Being able to use the h global and serve static files in a familiar way will make it easier to port Pylons projects and