How to get current session user in models.py?

I want to use a custom 'Manager' on a certain Model, which contains a
'user' field.
In this customized Manager, I want to filter records according to
whether the 'user' field equals to the current session username.

I know I can get 'user' from 'request' parameter, but the Manager is
located in the Meta part of a Model, how can I get the 'user' in this
case?

Can I achieve this without using other code in views?

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 [email protected].
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.

Reply via email to