> Hi,
>
> Basically within my application for whatever reason I am changing the
> user and doing something like this:
>
> Ex: at first the request.user = UserA
>
> request.user = Users.objects.get(some exp)
>
> After this the request.user = UserB
>
> However once the page redirects to another page the request.user goes
> back to being the original one (UserA) that logged in. How do I
> permanently change the request.user for the duration of the session?
>
> Thank you all,
> Nathan.
Write your own middleware in place of
django.contrib.auth.middleware.AuthenticationMiddleware, which returns
your UserB instead of UserA.
--
DR.
--
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-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment