django-websocket-redis icon indicating copy to clipboard operation
django-websocket-redis copied to clipboard

Switching from username to users id

Open markwingerd opened this issue 7 years ago • 1 comments

Is there a way to use a user's id instead of their username?

In my django project I have a few views which receive a user_id but have no use for any other part of the User object. These views need to be very fast and retrieving the User object just to get the username isn't ideal. I was wondering if it's possible in the current implementation or if an improvement could be made to get this functionality.

markwingerd avatar Nov 01 '18 00:11 markwingerd

It probably is easy to implement. But how would you do that in a generic and portable manner? Isn't it easier for you to transfer the username to the client?

jrief avatar Nov 01 '18 08:11 jrief