Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Mike Orr
On Thu, Jan 27, 2011 at 9:32 PM, Michael Merickel 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 don't know how t

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Michael Merickel
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 On Thu, Jan 27, 2011 at 11:06 PM, Mike Orr wrote: > On Thu, Jan 27, 2011 at 6:06 PM, M

Re: pyramid_sqla 1.0rc1 released

2011-01-27 Thread Mike Orr
On Thu, Jan 27, 2011 at 6:06 PM, Michael Merickel 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 never came up d

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 wrote: > Is there a reason that a pyra

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 wrote: > stucco_auth's "the approach" includes

Re: I wonder how can I access to settings informations in view function ?

2011-01-27 Thread Stéphane Klein
Le 27/01/2011 22:54, Andrey Popp a écrit : Hello, you can get it through request.registry.settings: def my_view(request): settings = request.registry.settings foobar = settings['datas'] # how can have access to settings dict ? return ... Thanks -- Stéphane Klein blog: http://s

Re: Serving mobile templates

2011-01-27 Thread Brian O'Connor
Ah - I forgot to mention ... I'm using Pylons 1.0. Thanks for the reference though, that's good to know for future pyramid apps. On Thu, Jan 27, 2011 at 5:02 PM, Daniel Holth wrote: > You could try > http://docs.pylonsproject.org/projects/pyramid/dev/narr/renderers.html#overriding-a-renderer-at

Re: Serving mobile templates

2011-01-27 Thread Daniel Holth
You could try http://docs.pylonsproject.org/projects/pyramid/dev/narr/renderers.html#overriding-a-renderer-at-runtime -- 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 uns

Serving mobile templates

2011-01-27 Thread Brian O'Connor
What's the current best practice for serving mobile templates? The ideal situation for me _right now_ would be if I detect a user on a mobile client (either by url or USER_AGENT detection), the render() function would first look in a mobile_templates directory, and if nothing exists, it falls back

Re: I wonder how can I access to settings informations in view function ?

2011-01-27 Thread Andrey Popp
Hello, you can get it through request.registry.settings: def my_view(request): settings = request.registry.settings foobar = settings['datas'] # how can have access to settings dict ? return ... -- You received this message because you are subscribed to the Google Groups "pylons-dis

I wonder how can I access to settings informations in view function ?

2011-01-27 Thread Stéphane Klein
Hi, I wonder how can I access to settings informations in view function ? def my_view(request): foobar = settings['datas'] # how can have access to settings dict ? return ... Thanks for your help. Regards, Stephane -- Stéphane Klein blog: http://stephane-klein.info Twitter: http://t

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 tem

Pyramid ZODB+Traversal wiki tutorial docs

2011-01-27 Thread Mike Sarahan
Hi guys, I noticed a couple of tiny mistakes in the docs for the ZODB+Traversal wiki tutorial. 1. On the "Defining the Domain Model" page, where it discusses adding the dependency to docutils, the setup.py source code does not actually add that dependency. I checked that the SQLAlchemy-URLdispat

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 agreement