jrief / django-websocket-redis

Websockets for Django applications using Redis as message queue
http://django-websocket-redis.awesto.com/
MIT License
895 stars 221 forks source link

Switching from username to users id #280

Open markwingerd opened 5 years ago

markwingerd commented 5 years ago

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.

jrief commented 5 years ago

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?