Log Out With User Authentication - Django Wednesdays #22

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 มิ.ย. 2024
  • In this video we'll add the ability to log out a user in our Django App.
    Logging out witht he Django User Authentication system is very easy, we'll just create a simple view and url to handle it.
    I'll also show you how to determine whether or not a user is logged in or not and show a different navbar link accordingly.
    #django #codemy #JohnElder
    Timecodes
    0:00​​ - Introduction
    1:08 - Navbar user.is_authenticated
    3:00 - Logout User View
    4:00 - Logout Flash Message
    5:00 - Logout URL
    6:00 - Logout Navbar Link
    6:39 - Conclusion

ความคิดเห็น • 64

  • @Codemycom
    @Codemycom  2 ปีที่แล้ว

    ▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/35Xo9jD bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/3sJpeV6

  • @johngiangrande2996
    @johngiangrande2996 2 ปีที่แล้ว +3

    Great job John! I became a Codemy member especially to say 'thanks' for all that I've learned from your videos. Hopefully, other viewers will do the same. It's insanely cheap!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Thanks! I appreciate that!

  • @syednasirdanial6491
    @syednasirdanial6491 10 หลายเดือนก่อน +1

    I learned Django from you, John. You are the best!

    • @Codemycom
      @Codemycom  10 หลายเดือนก่อน

      Thanks!

  • @meghdmistry
    @meghdmistry 2 ปีที่แล้ว +2

    Thanks for uploading again. Our teacher is back!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Happy to be back!

  • @rodiekozlovsky2415
    @rodiekozlovsky2415 ปีที่แล้ว +1

    You Are the best. Number one teacher!

  • @erdyllrodriguez3551
    @erdyllrodriguez3551 2 ปีที่แล้ว +1

    You are amazing men. Thanks for everything!!!

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Glad you're enjoying it!

  • @tuorectors7102
    @tuorectors7102 2 ปีที่แล้ว

    Happy to see you that you are back at your work 😆

  • @user-ye5vg4lq8t
    @user-ye5vg4lq8t 11 หลายเดือนก่อน

    You're the best mate !!! 🤝

    • @Codemycom
      @Codemycom  11 หลายเดือนก่อน

      Thanks!

  • @lorimedicenter4439
    @lorimedicenter4439 ปีที่แล้ว

    thank you very mon prof....tu es meilleur . i wait for another video

    • @Codemycom
      @Codemycom  ปีที่แล้ว

      link to the playlist in the pinned comment with all the videos...no need to wait.

  • @suryalakshman6157
    @suryalakshman6157 2 หลายเดือนก่อน

    you are my hero!

    • @Codemycom
      @Codemycom  2 หลายเดือนก่อน

      Thanks!

  • @seforaabigail6704
    @seforaabigail6704 2 ปีที่แล้ว

    thank u so much!!! amazing 🥰

  • @codeKeshav
    @codeKeshav 2 ปีที่แล้ว

    Our legend teacher is back.

  • @swapnilhajare5557
    @swapnilhajare5557 8 หลายเดือนก่อน

    Thanks for the video 👍🏻

    • @Codemycom
      @Codemycom  8 หลายเดือนก่อน +1

      welcome

  • @hiwab41
    @hiwab41 2 ปีที่แล้ว

    Great!

  • @elionaiesf
    @elionaiesf 6 หลายเดือนก่อน

    Show de Bola

  • @abhishekchamp1776
    @abhishekchamp1776 2 ปีที่แล้ว +1

    Python legend is back!!!

  • @prashantpandit2031
    @prashantpandit2031 2 ปีที่แล้ว

    Love From India Sir🇮🇳

  • @subinkv6849
    @subinkv6849 ปีที่แล้ว

    Thank you sir

  • @99186shuang
    @99186shuang 2 ปีที่แล้ว

    You are awesome! Will you be able to show how to create user registration form/signup form page and how we connect to the user authentication?

  • @briangreenberg153
    @briangreenberg153 2 ปีที่แล้ว

    John, you had mentioned changing to a date picker and time picker for imputting date and time of events. Will you be doing that soon? Thanks!

  • @Ajay-ck5bj
    @Ajay-ck5bj 2 ปีที่แล้ว

    after logged out, pressing back button in browser ,will redirect to home page, please do some videos about session handling. ❤

  • @ajitpatil6532
    @ajitpatil6532 ปีที่แล้ว

    there is one issue with the logout:
    even after logging out if we navigate back in the browser it sends us back again to the previous screen (which we should 't be able to see as we are logged out).

  • @aannookhan2868
    @aannookhan2868 2 ปีที่แล้ว

    also, make a video on virtual environment and directories.
    thanks...

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว +1

      Have many many videos on that already on the channel

    • @aannookhan2868
      @aannookhan2868 2 ปีที่แล้ว

      @@Codemycom well. I will watch that must, thanks

  • @user-sf4uw5wp6e
    @user-sf4uw5wp6e หลายเดือนก่อน

    Thank you the back button not working after logout with that application, my problem if I have multiple application in this case the back button returns to the previous page , what can I do

    • @Codemycom
      @Codemycom  หลายเดือนก่อน

      you can make your buttons point to whatever you want, in the normal way using django url tags

  • @picasso_eye
    @picasso_eye 2 ปีที่แล้ว +1

    😀

  • @ali-h
    @ali-h 2 ปีที่แล้ว

    Boss come back again.

  • @mirshodoripov1035
    @mirshodoripov1035 ปีที่แล้ว

    Hi bro. Can you tell me where I can download this blog project code?

    • @Codemycom
      @Codemycom  ปีที่แล้ว +1

      Code is always linked in the pinned comment, as stated in each video. github.com/flatplanet/djangoblog

  • @yourdad9293
    @yourdad9293 6 หลายเดือนก่อน

    What are the requirements to run this project locally.

    • @Codemycom
      @Codemycom  6 หลายเดือนก่อน

      Just what is shown in the videos.

  • @krisuu4106
    @krisuu4106 หลายเดือนก่อน

    hey, could you update this tutorial? I did step by step and i get 405 error :(

    • @Codemycom
      @Codemycom  หลายเดือนก่อน

      It doesn't need updating, you got an error because you typed the code wrong somewhere.

  • @anishghimire1534
    @anishghimire1534 2 ปีที่แล้ว

    How to expire session automatically if user is not active

    • @Codemycom
      @Codemycom  2 ปีที่แล้ว

      Why? If they aren't active...

  • @ayushsuniltripathi21
    @ayushsuniltripathi21 2 ปีที่แล้ว

    Sir I am very sad about your mother death, you try best for her but God knows that the last date of human. Feeling so bad sir

  • @user-ns4if1cu2o
    @user-ns4if1cu2o 5 หลายเดือนก่อน

    please help it has been 2 days that i search for a solution for the user.is_authenticated it doesn't work for me it always returning false , even if i'm logged in

    • @Codemycom
      @Codemycom  5 หลายเดือนก่อน

      Then you likely aren't actually logged in. Check your login code.