Re: Storing settings on module level -- bad idea?

2012-02-01 Thread Rob Miller
These are reasonable points to make. But Pyramid is explicitly not trying to be the same thing that either Django or Rails is trying to be. Those are what we call opinionated frameworks, which make things easier on less experienced developers by making many choices for them. This usually comes

Re: Storing settings on module level -- bad idea?

2012-02-01 Thread Tom Lazar
Amen, brother! Sent from a phone, please excuse the brevity. On 01.02.2012, at 09:03, Rob Miller r...@kalistra.com wrote: These are reasonable points to make. But Pyramid is explicitly not trying to be the same thing that either Django or Rails is trying to be. Those are what we call

Re: View Callables as a Class and Dependency Injection

2012-02-01 Thread papagr
Hi Chris, On Feb 1, 2:21 am, Chris McDonough chr...@plope.com wrote: On Tue, 2012-01-31 at 15:09 -0800, papagr wrote: Hello everyone, From the object-oriented point of view, a Pyramid View (instance of a callable class) depends on the context and the request. Pyramid, correctly injects

Re: URL rewriting in traversal appllication

2012-02-01 Thread Benjamin Hepp
Hi, as I already wrote I'm interested in being able to rewrite URLs before the resource lookup starts. I thought about doing this as a tween. From looking at the code I think it should be enough to change the path attribute of the request (I'm also changing url and path_qs and path_url). Now I

Re: URL rewriting in traversal appllication

2012-02-01 Thread Chris McDonough
On Wed, 2012-02-01 at 14:00 +0100, Benjamin Hepp wrote: Hi, as I already wrote I'm interested in being able to rewrite URLs before the resource lookup starts. I thought about doing this as a tween. From looking at the code I think it should be enough to change the path attribute of the

Re: URL rewriting in traversal appllication

2012-02-01 Thread Benjamin Hepp
Thanks for this, that was exactly what I needed. If anyone is interested, I put it on PYPI even though it's not much: http://pypi.python.org/pypi/pyramid_rewrite/0.1 I find it especially useful to deal with the favicon issue (I find it quite weird to write an extra view for some static content).

Turbogears to Pyramid

2012-02-01 Thread sajuptpm
HI, I have a project developed in turbogears, i want to move it to Pyramid, is it possible ??? I am using following feature of TG2 controller sqlalchemy tg2env developement.ini Not using any template system, since UI developed using EXTJS Reason to this change is, Pylons stopped further support

Re: Storing settings on module level -- bad idea?

2012-02-01 Thread Mike Orr
On Wed, Feb 1, 2012 at 12:03 AM, Rob Miller r...@kalistra.com wrote: These are reasonable points to make. But Pyramid is explicitly not trying to be the same thing that either Django or Rails is trying to be. Those are what we call opinionated frameworks, which make things easier on less

Re: chameleon: How to check whether user is logged in or not

2012-02-01 Thread cd34
On Jan 31, 2:22 am, Kesav Kumar Kolla kesavko...@gmail.com wrote: I want to conditionally include some links in my chameleon template.  How to write condition in chameleon to check whether user is logged in? Making A “User Object” Available as a Request Attribute (first paragraph)

Re: URL rewriting in traversal appllication

2012-02-01 Thread Mike Orr
On Wed, Feb 1, 2012 at 6:04 AM, Benjamin Hepp benjamin.h...@googlemail.com wrote: Thanks for this, that was exactly what I needed. If anyone is interested, I put it on PYPI even though it's not much: http://pypi.python.org/pypi/pyramid_rewrite/0.1 I find it especially useful to deal with the

Re: Turbogears to Pyramid

2012-02-01 Thread cd34
On Feb 1, 2:36 pm, sajuptpm sajup...@gmail.com wrote: I have a project developed in turbogears, i want to move it to Pyramid,  is it possible ??? I am using following feature of TG2 controller The closest thing to the controller structure from TG2 are handlers. while I documented a Pylons

Re: Turbogears to Pyramid

2012-02-01 Thread Christoph Zwerschke
Am 01.02.2012 20:36, schrieb sajuptpm: Reason to this change is, Pylons stopped further support for TG2. There may be reasons for switching from TG2 to Pyramid, but that is not a valid reason. Pylons will not be a requirement any more in TG 2.3. There had been plans to create a next

Re: Turbogears to Pyramid

2012-02-01 Thread Mike Orr
On Wed, Feb 1, 2012 at 12:04 PM, cd34 mcd...@gmail.com wrote: On Feb 1, 2:36 pm, sajuptpm sajup...@gmail.com wrote: I have a project developed in turbogears, i want to move it to Pyramid,  is it possible ??? I am using following feature of TG2 controller The closest thing to the controller

Re: pyramid_rpc

2012-02-01 Thread cd34
On Jan 31, 1:03 am, binadam ibnad...@gmail.com wrote: Does pyramid_rpc.jsonrpc only accept 2.0 requests? when i use android- json-rpc client to make rpc call i get JsonRpcRequestInvalid exception, so I'm guessing android client is sending v1.0 requests (must admit I don't know difference

Re: Turbogears to Pyramid

2012-02-01 Thread Carlos Daniel Ruvalcaba Valenzuela
I think a sensible approach is to stay with turbogears if you have already invested time on it for that project, turbogears is not going anywhere any time soon, recent development has even decoupled the codebase from pylons if that is what bothers you, but if all you want is to migrate it to

Re: pyramid_rpc

2012-02-01 Thread binadam
On Feb 1, 12:21 pm, cd34 mcd...@gmail.com wrote: On Jan 31, 1:03 am, binadam ibnad...@gmail.com wrote: Does pyramid_rpc.jsonrpc only accept 2.0 requests? when i use android- json-rpc client to make rpc call i get JsonRpcRequestInvalid exception, so I'm guessing android client is sending

Pyramid with Gunicorn setup

2012-02-01 Thread Raj
-=Thanks to Ben Bangert for this quick script to get your Pyramid app up and running with Gunicorn=- You can easily run Gunicorn with the production.ini (or development.ini) file you've been using with Waitress (or Paster for older Pyramid installs), and still start it with `pserve

Re: Pyramid with Gunicorn setup

2012-02-01 Thread Raj
Also, make sure you've installed Gunicorn prior to attempting the above post. Install instructions can be found here-- http://gunicorn.org/install.html On Feb 1, 7:11 pm, Raj raj.tha...@gmail.com wrote: -=Thanks to Ben Bangert for this quick script to get your Pyramid app up and running with

match_param as a dict

2012-02-01 Thread Joel Kaiser
Hello, I'm new to pyramid and so I'm reading the docs, trying and testing around. Chapter View Configuration describes arguments for the view_config decorator. So I tried match_param as a string and a dict. If I'm using a string everything works fine. If I'm using a dict I can't start waitress

Re: pyramid_rpc

2012-02-01 Thread cd34
On Feb 1, 6:18 pm, binadam ibnad...@gmail.com wrote: Looks like android-json-rpc is doing v1.0 as seen below: {id:1,method:search,params: [34.0149334,-118.2710851,100,-50,50]} json-rpc 2.0 supports both named positional parameters which is why I'm guessing it worked after bypassing the

Introducing pyramid_scss

2012-02-01 Thread Jesse Dhillon
Hi, I've created an extension to Pyramid which provides SCSS rendering. If anyone's interested, I'd appreciate some feedback on it: https://github.com/jessedhillon/pyramid_scss (It's also in PyPI) In particular, it needs tests -- some