Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Marc Tamlyn
I think therefore you could resolve the issue by doing save(update_fields=['count']) in your code. On 15 January 2015 at 06:31, Horacio G. de Oro wrote: > Yeap. Removing the save() done in solved the issue. > > And some component is doing and update() - not a save(). I see in the > Postgresql l

Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Horacio G. de Oro
Yeap. Removing the save() done in solved the issue. And some component is doing and update() - not a save(). I see in the Postgresql logs an UPDATE of the hash with the new increment, that includes only the "password" field. I thought that autenticate() produced a read operation on the DB... n

Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Horacio G. de Oro
I do something like. # get the user to check tries user = User.object.get(username=username) assert user.count <= 3 # authenticate authenticated_user = authenticate(...) # auth failed if not authenticated_user: user.count++ user.save() raise

Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Horacio G. de Oro
As part of the authentication process, I increment/reset authentication tries of the user. And to check this, I get the user from the DB before doing the authentication. I think this is causing me the issue. I reset the countre of login attempts in an instance of user that is different than the

Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Horacio G. de Oro
I haven't tested the issue outside my project. But while debugging, I saw the new hash in the user instance returned by authenticate(), but that new hash never went to the database since I haven't done a 'save()' of the user instance. If you see the new hash in the database, I think that, maybe

Re: Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Tim Graham
Hi Horacio, Thanks for the report. Unfortunately, I can't reproduce this issue. My steps to reproduce using the project from the tutorial: Bump PBKDF2PasswordHasher.iterations to a higher value Login at /admin/ Confirm at /admin/auth/user/#/ that the password of the user I logged in as reflects

Re: Generic relations and aggregation

2015-01-14 Thread Tim Graham
Yes, there is an open ticket to update the documentation: https://code.djangoproject.com/ticket/24019 If you're able to work on a patch, I'll be happy to review it. On Wednesday, January 14, 2015 at 5:56:26 PM UTC-5, x13 wrote: > > > According to Django 1.7 Docs, aggregation API is not working w

Generic relations and aggregation

2015-01-14 Thread x13
According to Django 1.7 Docs, aggregation API is not working with generic relations https://docs.djangoproject.com/en/1.7/ref/contrib/contenttypes/#generic-relations-and-aggregation Bookmark.objects.aggregate(Count('tags')) # Not working according to Docs. But this bug seems to be fixed in #

Can't login after upgrading to 1.7.3, and workaround

2015-01-14 Thread Horacio G. de Oro
The problem is because the iterations in PBKDF2PasswordHasher where updated to 15000, so it updates the password, but later, SessionAuthenticationMiddleware detects a password change and PUF! the login doesn't work. Right new I've created a PBKDF2PasswordHasher implementation with iteartions =

Re: Formalizing template loader and debug api's

2015-01-14 Thread Preston Timmons
Hi Aymeric, I got a chance to update my patch with the use of origins. The good news is that it's simpler than the old implementation. I have a few api questions below. The updated branch is here for now: https://github.com/prestontimmons/django/compare/ticket-15053-origin?expand=1 As a quick re