Code Monkey home page Code Monkey logo

Comments (6)

zaxlct avatar zaxlct commented on May 28, 2024

用户退出的相关代码是不是有点问题? 比对一下我的源码,看看是不是哪里马虎写错了,试试,亲

还有,可以 DEBUG 下,看看点击退出后,代码在哪里出了问题,退出的时候是否进入到了退出的逻辑

from imooc-django.

SayHITell avatar SayHITell commented on May 28, 2024

好像是这样的:如果用的是设置的超级用户登录的话,就无法退出,调试结果就是不会进入LogoutView而是直接进入IndexView;如果只是用普通用户登录的话就能正常运行。

from imooc-django.

zaxlct avatar zaxlct commented on May 28, 2024

@SayHITell 超级用户你登录,admin ,然后点击 admin 里的右上角退出

from imooc-django.

SayHITell avatar SayHITell commented on May 28, 2024

我在Chrome下试了很多次,把cookie和缓存清空可以登录退出,然后再一次登录就退出不了了。

from imooc-django.

zaxlct avatar zaxlct commented on May 28, 2024

@SayHITell 清除 cookie 肯定能退出,因为 cookie 里保存着登录需要的 token ,这不是解决问题的办法。

from imooc-django.

SayHITell avatar SayHITell commented on May 28, 2024

嗯,所以我也不知道这是哪出错了,代码是直接用你的没改过

from imooc-django.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.