Re: Implement su (i.e. substitute user) in Django

2011-05-23 Thread Joakim Hove
> Before the login call: > > user.backend = 'django.contrib.auth.backends.ModelBackend' Works like charm; thank you very much! Joakim [PS: For others reading this - the right hand side in the assignment above should indeed be a string literal, i.e. with the ''] -- You received this message be

Re: Implement su (i.e. substitute user) in Django

2011-05-23 Thread Shawn Milochik
Before the login call: user.backend = 'django.contrib.auth.backends.ModelBackend' Sorry. I copied & pasted the previous and didn't think this part was necessary. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: Implement su (i.e. substitute user) in Django

2011-05-23 Thread Joakim Hove
Hmmm; thank you for answering. > from django.contrib.auth import login > > (in view) > login(request, user) This was indeed simple; however I can unfortunately not get it to work. The view returns a traceback starting with: AttributeError at /su/ 'User' object has no attribute 'backend'

Re: Implement su (i.e. substitute user) in Django

2011-05-23 Thread Shawn Milochik
from django.contrib.auth import login (in view) login(request, user) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-use

Implement su (i.e. substitute user) in Django

2011-05-23 Thread Joakim Hove
Hello, for my little site there are a couple of different types of users, and the view presented to the user differs depending on what type of user this is. For me (as a super user) - it would be very convenient If I could change identity and become another user, without having to log out and log