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.
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?
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.