Re: Does a pre/post_save signal know who is the user currently logged in?
On 19 jul, 17:33, "Lic. José M. Rodriguez Bacallao" <[EMAIL PROTECTED]> wrote: > take a look at:http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser Great! It worked like a charm! Thanks very much José. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Does a pre/post_save signal know who is the user currently logged in?
take a look at: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On 7/19/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 7/19/07, Xanthus <[EMAIL PROTECTED]> wrote: > > A view knows the logged in user through request.user but i could not > > find if a signal has this information somewhere. > > No, this information is not available in the default signals. This is > because Django can be used completely independently of its > authentication system and completely indepdendently of its HTTP > request/response system (e.g., you can set up cron jobs, use Django as > a backend to a non-web application, etc.); if the request object and > auth system were that tightly coupled to the model layer, a lot of > uses wouldn't be possible. > > -- > "Bureaucrat Conrad, you are technically correct -- the best kind of > correct." > > > > -- Lic. José M. Rodriguez Bacallao Cupet - Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Does a pre/post_save signal know who is the user currently logged in?
take a look at: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On 7/19/07, James Bennett <[EMAIL PROTECTED]> wrote: > > > On 7/19/07, Xanthus <[EMAIL PROTECTED]> wrote: > > A view knows the logged in user through request.user but i could not > > find if a signal has this information somewhere. > > No, this information is not available in the default signals. This is > because Django can be used completely independently of its > authentication system and completely indepdendently of its HTTP > request/response system (e.g., you can set up cron jobs, use Django as > a backend to a non-web application, etc.); if the request object and > auth system were that tightly coupled to the model layer, a lot of > uses wouldn't be possible. > > -- > "Bureaucrat Conrad, you are technically correct -- the best kind of > correct." > > > > -- Lic. José M. Rodriguez Bacallao Cupet - Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Does a pre/post_save signal know who is the user currently logged in?
On 7/19/07, Xanthus <[EMAIL PROTECTED]> wrote: > A view knows the logged in user through request.user but i could not > find if a signal has this information somewhere. No, this information is not available in the default signals. This is because Django can be used completely independently of its authentication system and completely indepdendently of its HTTP request/response system (e.g., you can set up cron jobs, use Django as a backend to a non-web application, etc.); if the request object and auth system were that tightly coupled to the model layer, a lot of uses wouldn't be possible. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Does a pre/post_save signal know who is the user currently logged in?
I'm implementing a model modification history and the only thing it is lacking is saving the user who did the modification. A view knows the logged in user through request.user but i could not find if a signal has this information somewhere. Thanks in advance! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---