Re: Cleaning up files generated for user session

2012-02-10 Thread Greg Slodkowicz
Oh, I see. For no good reason I assumed the cleanup should be done by Pyramid but a cronjob obviously also works. Thanks to both of you. -Greg -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

mod_wsgi and reload

2012-02-10 Thread Antonio Beamud Montero
In our system, we have a test server, with several pyramid environments. These environments are very similar to the production system (apache2 + mod_wsgi...) but with debugging and template reloading enabled. The problem arises with the auto-reload code. I've configured apache2 + mod_wsgi in

Re: SQLAHelper 1.0 released, and a proposal

2012-02-10 Thread Daniel Holth
I do not understand why I would want to share a declarative_base() between packages. I think there has just been some confusion between the idea of sharing a session (useful) with the idea of sharing a declarative_base() (problematic). The following setup, each class having its own

Re: Cleaning up files generated for user session

2012-02-10 Thread Wyatt Baldwin
Do you need to save temp files at all? Are the PNGs expensive to generate in R? Can you request raw bytes from R instead of saving to file? I have a scenario that's similar to yours (not using R, though; I'm generating audio files), and I stream the bytes generated by the back end directly to

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Simon Yarde
Sorry I should have added, but resisted as I felt my message was long enough.. Just because Pyramid (or your app) raises an http exception doesn't mean you have to return that view. As Michael describes you can intercept and downgrade the exception as you deem appropriate. The reason your

Re: need your help to overhaul docs

2012-02-10 Thread Iain Duncan
Is there a plan to have a docs page about what's happening with the docs? (or wiki/trac/etc) I'd like to start documenting some of how we work with Pyramid and be able to integrate it better with the Real Docs. Thanks Iain -- You received this message because you are subscribed to the Google

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Mike Orr
On Fri, Feb 10, 2012 at 9:24 AM, Simon Yarde simonya...@me.com wrote: I always seem to find the meaning of http status code 302 rather odd in the auth context because it says The requested resource resides temporarily under a different URI, which is not accurate but seems to be the best fit.

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Michael Merickel
Likely pyramid.httpexceptions.HTTPSeeOther should be used instead (status code 303). http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html The new URI is not a substitute reference for the originally requested resource. On Fri, Feb 10, 2012 at 11:48 AM, Mike Orr sluggos...@gmail.com wrote:

Re: SQLAHelper 1.0 released, and a proposal

2012-02-10 Thread Mike Orr
On Fri, Feb 10, 2012 at 6:19 AM, Daniel Holth dho...@gmail.com wrote: I do not understand why I would want to share a declarative_base() between packages. One reason is so you can call Base.metadata.create_all() to create all tables, without having to go into each individual package or keep

Re: need your help to overhaul docs

2012-02-10 Thread Blaise Laflamme
You can start a page on the github pyramid wiki -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/35xtwwCxsMgJ. To post to this group, send email to

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Michael Merickel
On Fri, Feb 10, 2012 at 11:24 AM, Simon Yarde simonya...@me.com wrote: I might have come at it differently raising 401 initially (all we can say is 'auth required' because we don't know who the user is) and then issue 403 if the authenticated user lacked a particular permission, but then I

Re: does anyone know how to test if we're in a 'static' view or route ?

2012-02-10 Thread Iain Duncan
On Wed, Feb 8, 2012 at 10:52 AM, Jonathan Vanasco jonat...@findmeon.comwrote: thanks! On Feb 8, 1:45 pm, Chris McDonough chr...@plope.com wrote: On Wed, 2012-02-08 at 10:32 -0800, Jonathan Vanasco wrote: i've got some debugging info on event subscribers; i'd like keep them from running

Re: need your help to overhaul docs

2012-02-10 Thread Iain Duncan
On Fri, Feb 10, 2012 at 9:57 AM, Blaise Laflamme bla...@laflamme.orgwrote: You can start a page on the github pyramid wiki What I mean was to ask whether Graham et al would be putting up a roadmap somewhere of their reorg so I can slant my efforts accordingly. Thanks Iain -- You received

Re: need your help to overhaul docs

2012-02-10 Thread Arndt Droullier
Am Freitag, den 10.02.2012, 09:57 -0800 schrieb Blaise Laflamme: You can start a page on the github pyramid wiki BTW, will the new website also include user accounts to publish How Tos or pyramid extensions? Especially a central list of pyramid extensions was useful. Arndt. -- You

Re: need your help to overhaul docs

2012-02-10 Thread Chris McDonough
On Fri, 2012-02-10 at 19:13 +0100, Arndt Droullier wrote: Am Freitag, den 10.02.2012, 09:57 -0800 schrieb Blaise Laflamme: You can start a page on the github pyramid wiki BTW, will the new website also include user accounts to publish How Tos or pyramid extensions? Especially a central

need opinions for dependencies for some Pyramid related code

2012-02-10 Thread Iain Duncan
Hi folks, I want to publish/release some of our internal work this year. Right now we have a lot of dependencies that can maybe be trimmed as we started this stuff ages ago first on Pylons and then Repoze.bfg. I know that a bad dependency choice can really hamper uptake, and that Pyramid has done

Re: need your help to overhaul docs

2012-02-10 Thread Iain Duncan
The docs overhaul project isn't about a new website, it's just about overhauling the existing narrative and API docs. Currently the Cookbook is where to put howtos (you can fork it and add new howtos via https://github.com/Pylons/pyramid_cookbook). You can create Pyramid extensions and

Re: need your help to overhaul docs

2012-02-10 Thread Chris McDonough
On Fri, 2012-02-10 at 10:23 -0800, Iain Duncan wrote: The docs overhaul project isn't about a new website, it's just about overhauling the existing narrative and API docs. Currently the Cookbook is where to put howtos (you can fork it and add

Re: need your help to overhaul docs

2012-02-10 Thread Iain Duncan
On Fri, Feb 10, 2012 at 10:26 AM, Chris McDonough chr...@plope.com wrote: On Fri, 2012-02-10 at 10:23 -0800, Iain Duncan wrote: The docs overhaul project isn't about a new website, it's just about overhauling the existing narrative and API docs.

Re: need your help to overhaul docs

2012-02-10 Thread Joe Dallago
Count me in for $25. I can give it to you at PyCon, if that is not too late. Otherwise, Paypal or something. On Fri, Feb 10, 2012 at 12:36 PM, Iain Duncan iainduncanli...@gmail.com wrote: On Fri, Feb 10, 2012 at 10:26 AM, Chris McDonough chr...@plope.com wrote: On Fri, 2012-02-10 at 10:23

Re: need opinions for dependencies for some Pyramid related code

2012-02-10 Thread Jason
Tempita and PasteScript: I use these for project templates. I assume there is a new way to do scaffolding in Pyramid, but I don't see a reason to translate my project templates (they aren't generic enough to be useful to anyone else). FormEncode: I really like FormEncode for validation. The

Re: SQLAHelper 1.0 released, and a proposal

2012-02-10 Thread Chris Withers
On 10/02/2012 14:19, Daniel Holth wrote: I do not understand why I would want to share a declarative_base() between packages. A table defined in one package may have foreign key relationships to a table defined in another package. I often hit this with authentication packages where other

Re: need your help to overhaul docs

2012-02-10 Thread Mike Orr
On Fri, Feb 10, 2012 at 9:57 AM, Blaise Laflamme bla...@laflamme.org wrote: You can start a page on the github pyramid wiki I started a page for the documentation roadmap and user suggestions. https://github.com/Pylons/pyramid/wiki/Documentation-Roadmap -- Mike Orr sluggos...@gmail.com --

Re: need your help to overhaul docs

2012-02-10 Thread Chris McDonough
On Fri, 2012-02-10 at 13:12 -0800, Mike Orr wrote: On Fri, Feb 10, 2012 at 9:57 AM, Blaise Laflamme bla...@laflamme.org wrote: You can start a page on the github pyramid wiki I started a page for the documentation roadmap and user suggestions.

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Yap Sok Ann
Hi Simon, Actually, the code I posted does work, and I was just looking for a better solution. If you read my reply to you: I think I will just rename my view from login to not_authorized, and make the 403 response looks more conforming. that's essentially the same as what Michael suggested

Re: Raising 403 within traversal when the Forbidden context is already used to show the login page

2012-02-10 Thread Michael Merickel
The real bad practice in the tutorial currently is that it shows you a login view even if you are already logged in. It's not actually wrong to show the login template at the content URL instead of redirecting the user to a login URL. However it's also not usually what you want. Thus the open

writing unit tests that cover pylons and pyramid

2012-02-10 Thread Jonathan Vanasco
my tests keep failing on pylons packages. actually, i can't even run the tests. i've traced the error to this being in my packages: from pylons import c works fine in production, but not in testing looking at pylons/__init__.py, i see this line: tmpl_context = c =

Re: writing unit tests that cover pylons and pyramid

2012-02-10 Thread Michael Merickel
You might want to ensure both systems are running the same version of Pylons. I believe c is deprecated in 0.10 and removed entirely in 1.0 in favor of tmpl_context. On Sat, Feb 11, 2012 at 12:06 AM, Jonathan Vanasco jonat...@findmeon.comwrote: my tests keep failing on pylons packages.