Re: auth.contrib silently catching TypeError. Bug?

2009-04-22 Thread Tamas
I've raised this as a bug: http://code.djangoproject.com/ticket/10901 Regards, Tamas On Apr 20, 4:20 pm, Tamas Szabo wrote: > Hi, > > The function authenticate in django/contrib/auth/__init__.py reads: > > 31        def authenticate(**credentials): > 32          "&

auth.contrib silently catching TypeError. Bug?

2009-04-20 Thread Tamas Szabo
ise this as a bug, but first I wanted to make sure that others would consider it a bug too. Cheers, Tamas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: auth.contrib silently catching TypeError. Bug?

2009-04-23 Thread Tamas Szabo
as a result which will be much slower then a changed implementation. Regards, Tamas On Thu, Apr 23, 2009 at 8:06 AM, James Bennett wrote: > > On Mon, Apr 20, 2009 at 4:20 AM, Tamas Szabo wrote: >> As you can see the code catches and silently ignores all TypeError >> ex

Re: auth.contrib silently catching TypeError. Bug?

2009-04-27 Thread Tamas Szabo
Hi Carl, On Mon, Apr 27, 2009 at 10:14 PM, Carl Meyer wrote: > > Hi Tamas, > > On Apr 23, 3:25 am, Tamas Szabo wrote: >> For example if I have a Token based authenticator >> (authenticate(token)) that is configured to be after my User/Password >> based au

Re: auth.contrib silently catching TypeError. Bug?

2009-04-27 Thread Tamas Szabo
On Tue, Apr 28, 2009 at 12:31 PM, James Bennett wrote: > > On Mon, Apr 27, 2009 at 10:49 PM, Tamas Szabo wrote: >> I'm new to Python so I might not understand how keyword arguments work, BUT >> you do assume that authenticate will always be called with keyword >&g

Re: How to handle this race condition?

2009-11-09 Thread Tamas Szabo
Would something like UPDATE bid = new_bid WHERE id = id and bid < new_bid work for you? It is a more optimistic approach (it assumes that the case you describe is an exception rather than what usually happens) and I think it is simpler by not having to do any locking etc. Regards, Ta

Re: How to handle this race condition?

2009-11-10 Thread Tamas Szabo
IMHO, both approaches are valid and have their own advantages and disadvantages. I don't think that we have enough information to make a suggestion. What works best for the situation is for the OP to decide. Regards, Tamas --~--~-~--~~~---~--~~ You received th

Re: How to handle this race condition?

2009-11-10 Thread Tamas Szabo
You can inspect the rowcount attribute of the cursor object after you executed your update. rowcount returns the number of rows affected by your update, so it will be 1 if your where condition was true. On Wed, Nov 11, 2009 at 10:04 AM, Continuation wrote: > > > > Would something like > > > > U

Re: request.POST['value'] cannot get value, 500 error

2009-11-10 Thread Tamas Szabo
Does request.POST['value'][0]['LastName'] work? It looks like your post data has an array (keyed as 'value') of dicts. You might also consider using Firebug (or something similar) to inspect the http requests and responses when you are developing. Regards, Tama