📜  如何获取用户 id django - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:46.256000             🧑  作者: Mango

代码示例2
if request.user.is_authenticated:
    # Do something for authenticated users.
else:
    # Do something for anonymous users.