Re: Pyramid handlers: authorization for entire handler action

2011-08-14 Thread Wyatt Baldwin
As of pyramid_handlers 0.2, you should be able to set the default permission for a handler like this: config.add_handler(..., view_permission='authenticated') -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To view this discussion on the

Pyramid handlers: authorization for entire handler action

2011-08-14 Thread walden
So I have a pyramid handler where the entire handler requires authorization. I've followed the guide here: http://sluggo.scrapping.cc/python/Akhet/auth.html. But instead of doing: @action(permission='authenticated') def some_method(self): For each action in my handler, is t

Re: Best practice on using Deform with placeholder attributes

2011-08-14 Thread Bobby
Thanks for replying. A small problem I ran into when emulating the html5 placeholder attribute is that emulating the behavior involves setting the input's value. A value that then has the chance of being submitted, if the value is never cleared by either the user focusing or binding a function to t

Re: ipython isn't invoked for "paster shell"

2011-08-14 Thread Michael Merickel
Another thing to mention is that we recently updated the Pyramid pshell to support IPython 0.11... the embedded shell was backward incompatible with 0.10. As 0.11 was only recently released you may be experiencing this fallback behavior. Looks like the Pylons shell will need an upgrade if anyone wa

Re: is it possible to use virtual environment with pylons without activation?

2011-08-14 Thread Malthe Borch
On 14 August 2011 21:22, Krishnakant Mane wrote: > Thanks a lot for this pointer. > However there is a small problem in this case. > before I initiate the serving of my pylons app from the vertual environment, > I have to start another service, this one being a twisted server for xmlrpc. > The cor

Re: is it possible to use virtual environment with pylons without activation?

2011-08-14 Thread Krishnakant Mane
On 15/08/11 00:39, cd34 wrote: you can do: #!/path/to/virtualenv/bin/python in your startup script which will cause the script to load from that environment. Cron jobs are often run this way. At that point, you might also choose to update your environment: import os, sys, site sys.path.appen

Re: is it possible to use virtual environment with pylons without activation?

2011-08-14 Thread cd34
you can do: #!/path/to/virtualenv/bin/python in your startup script which will cause the script to load from that environment. Cron jobs are often run this way. At that point, you might also choose to update your environment: import os, sys, site sys.path.append('/path/to/pyramid/project') site

is it possible to use virtual environment with pylons without activation?

2011-08-14 Thread Krishnakant Mane
Hello all, I am writing a python script which should first start my core api engine as a service. Then it is supposed to start the nginx server behind which the pylons app will run. Now the issue is that the python script does not allow me to fire activate command. the concerned line is os.sys

Re: Calling another view callable

2011-08-14 Thread kes
On Aug 14, 1:28 am, Chris McDonough wrote: > > I'm afraid there's no API to do exactly what you want to do right now.   > Suggestions for a good API for this purpose would be useful (not the > obvious I just want to call the function and get a response; views can > be methods and instances too, a

Re: Calling another view callable

2011-08-14 Thread Mike Orr
On Sat, Aug 13, 2011 at 11:28 PM, Chris McDonough wrote: > On Sat, 2011-08-13 at 16:51 -0700, kes wrote: >> On Aug 13, 3:12 pm, Matt Feifarek wrote: >> >> > I don't think that it should be anything special; they're just functions >> > after all. >> > >> > So, something like this should work: >> >