📜  django logout - Python 代码示例

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

代码示例5
from django.contrib.auth.mixins import LoginRequiredMixin

class MyView(LoginRequiredMixin, View):
    login_url = '/login/'
    redirect_field_name = 'redirect_to'