Django: How to set default language in admin on login

Posted by lazerscience on Stack Overflow See other posts from Stack Overflow or by lazerscience
Published on 2010-05-31T12:37:39Z Indexed on 2010/05/31 12:42 UTC
Read the original article Hit count: 442

I'm saving an user's default language in his user profile and on login I want to set the admin's default language to it.

One possibility I was thinking of is using a middleware, but I think if I do it on process_request I will not see an user object there since this is processed AFTER the middleware, so I could only set it after the next request!
Any solutions are highly appreciated!

© Stack Overflow or respective owner

Related posts about django

Related posts about django-admin