Re: Pylons Backend Questions

2011-04-18 Thread Gopalakrishnan S
You can use HttpLib2, which is nice package for fetching data from internet. For running scripts periodically, you can consider using cron or celery task manager. celery is good.. -- krish On Apr 19, 12:12 am, Aviv Giladi wrote: > Hey guys, > > I am using Pylons for two things: > 1) Serving AP

Re: about unit test on auth fail

2011-04-18 Thread Chris McDonough
On Mon, 2011-04-18 at 17:13 -0700, Roy H. Han wrote: > On Apr 18, 7:48 pm, Wayne Witzel III wrote: > > On Wednesday, March 16, 2011 8:36:32 PM UTC-4, Shen, Yu-Teh wrote: > > > > > -- > > > Traceback (most recent call last): > > >

Re: about unit test on auth fail

2011-04-18 Thread Roy H. Han
On Apr 18, 7:48 pm, Wayne Witzel III wrote: > On Wednesday, March 16, 2011 8:36:32 PM UTC-4, Shen, Yu-Teh wrote: > > > -- > > Traceback (most recent call last): > >   File "/home/ytshen/proj/tests.py", line 104, in > > test_upload

Re: about unit test on auth fail

2011-04-18 Thread Roy H. Han
> Traceback (most recent call last): >   File "/home/ytshen/proj/tests.py", line 104, in > test_upload_forbidden >     self.assertRaises(Forbidden, upload, context, request) > AssertionError: Forbidden not raised My understanding of what is going on is that pyramid.config.testing_securitypolicy()

Re: about unit test on auth fail

2011-04-18 Thread Wayne Witzel III
On Wednesday, March 16, 2011 8:36:32 PM UTC-4, Shen, Yu-Teh wrote: > > > -- > Traceback (most recent call last): > File "/home/ytshen/proj/tests.py", line 104, in > test_upload_forbidden > self.assertRaises(Forbidden, u

Re: about unit test on auth fail

2011-04-18 Thread Roy H. Han
On Mar 16, 8:36 pm, "Shen, Yu-Teh" wrote: > Traceback (most recent call last): >   File "/home/ytshen/proj/tests.py", line 104, in > test_upload_forbidden >     self.assertRaises(Forbidden, upload, context, request) > AssertionError: Forbidden not raised Hi Yu-Teh, I'm getting the same error and

Re: Error Handling Question

2011-04-18 Thread Chris McDonough
On Mon, 2011-04-18 at 14:35 -0700, homebrew79 wrote: > I want to use an Exception View as described here: > http://docs.pylonsproject.org/projects/pyramid/dev/narr/views.html#exception-views, > to catch all exceptions and display a friendly "We're working on it" > message based on the master templa

Error Handling Question

2011-04-18 Thread homebrew79
I want to use an Exception View as described here: http://docs.pylonsproject.org/projects/pyramid/dev/narr/views.html#exception-views, to catch all exceptions and display a friendly "We're working on it" message based on the master template. I can do that fine, but I'd also like to have the email f

Pylons Backend Questions

2011-04-18 Thread Aviv Giladi
Hey guys, I am using Pylons for two things: 1) Serving API requests (returning JSONs describing my SQLAlchemy models) 2) Running a script 24/7 that fetches flight information from the internet (using HTTP) and pushes it into my DB (again using my models). I am NOT using Pylons as a front end, but

From Pylons to Pyramid, Authentication and Authorization and other libs

2011-04-18 Thread Gopalakrishnan S
I am coming from Pylons background and started studying the Pyramid and looking forward to migrate my site to Pyramid. 1. Are those repose.who and repoze.what are integral part of Pyramid or any other recommended packages available here? I want to SqlAlchemy based user/group or user/group/permissi

Re: Many DB calls when using user obj as a request attribute pattern

2011-04-18 Thread Adam Klekotka
Thanks for the reply. The code that calls the request.user object is placed in the views and the Mako templates. I found that checking permission generates that database calls. For each served static file, pyramid checks the permission to the file which generates additional db calls. In my project

Re: "Can't reconnect until invalid transaction is rolled back" with repoze.who / repoze.what

2011-04-18 Thread Richard Harding
Edwin, we're seeing a similar thing here and I've been trying to modify the form plugin to add a .remove() manually to see if it helps with little success. Can you verify that your wsgi wrap does work and can you share the code/what it's doing? Are you just importing from the models Session an

Re: Logging failed login attempts

2011-04-18 Thread Jason McKellar
On Sat, Apr 16, 2011 at 9:57 AM, Gustavo Narea wrote: > - If you're using the repoze.who SQLAlchemy plugin, then you have > method in the User class to check the password, which you can use to > log wrong passwords. > - If you're using another repoze.who authenticator plugin, you'd have > to repla

Re: Cluegun App Example Security

2011-04-18 Thread Sascha
Never mind, please. My app's cookie was interfering with the Cluegun cookie. It's probably a good idea to change the cookie_name when initiating the authentication policy. After doing that, everything worked as expected. Thanks! -- You received this message because you are subscribed to the Googl

Re: Cluegun App Example Security

2011-04-18 Thread Sascha
I just did the same thing - fresh install using virtualenv and a copy from github. Same issue though. Access to index_view - works okay: 2011-04-18 11:33:36,486 debug_authorization of url http://localhost:6543/ (view name u'' against context ): ACLAllowed permission 'view' via ACE ('Allow', 'syst

Re: Cluegun App Example Security

2011-04-18 Thread Michael Merickel
FWIW I just cloned and ran cluegun for the first time using "paster serve development.ini" in a new virtualenv and it ran fine for me. The /manage view redirected to /login, then admin/admin user/pass took me back to /manage where I was able to delete pastes. It does say "Failed login" on the logi

Re: Cluegun App Example Security

2011-04-18 Thread Sascha
Here's the debug information: debug_authorization of url http://localhost:6544/manage (view name u'manage' against context ): ACLDenied permission 'manage' via ACE '' in ACL [('Allow', 'system.Everyone', 'view'), ('Allow', 'admin', 'manage')] on context for principals ['system.Everyone'] The ACL