[Fixed]-How get django current user's name both in shell and in request

1👍

When using the Django shell, there is no current User. A method of working around this would be get the person who is using the shell to assign a User to the modified by field manually. This User would probably be dedicated for shell operations, but it doesn’t have to be that way. Another option could be to write a custom save() function for the model if you will only be changing it through the shell.

Leave a comment