Login and Logout - Django Wednesdays ECommerce 7

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 มิ.ย. 2024
  • In this video I'll show you how to set up the system to login and logout users of the site.
    We'll want people to be able to have their own accounts that they can log into.
    Eventually those accounts will keep track of orders and things like that...
    #django #codemy #JohnElder
    Timecodes
    0:00​​ - Introduction
    1:24 - Create Login/Logout URLs
    2:25 - Create Login Page
    3:21 - Create Login/Logout Views
    4:04 - Import Django Authenticate
    5:30 - Add Links To Navbar
    6:14 - Show Links if Logged In/Out
    7:35 - Add Form to Login Page
    10:40 - Add Form Method and Action
    11:07 - Add CSRF Token
    11:46 - Logout View Code
    12:42 - Login View Code
    17:00 - Fix Success Misspelling
    17:15 - Add Messages To Base.html
    18:47 - Test It All Out!
    19:39 - Conclusion

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

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

    ▶ Watch Django Wednesdays Ecommerce Playlist ✅ Subscribe To My TH-cam Channel:
    bit.ly/3OBQJfN 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 50% off with coupon code: youtube50 bit.ly/2VC9WUN
    ▶ Get The Code
    bit.ly/47xAhWJ

  • @TheLummen.
    @TheLummen. หลายเดือนก่อน +3

    Today I learned how to spell success !
    By the way thank you for including login, logout in your tutorials !

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

      Ha, yep!

  • @cristobalvera7676
    @cristobalvera7676 5 หลายเดือนก่อน +1

    Chanels like this is the reason cause I learned english lenguaje , Muchas gracias!

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

      Happy to hear that!

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

    Great video, I just finished
    Waiting for #8
    Thank you

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

      Happy to hear it!

  • @ebenezeradedotun4197
    @ebenezeradedotun4197 8 หลายเดือนก่อน +2

    Great content as always🎉

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

      Thanks!

  • @CreatorOfHumans
    @CreatorOfHumans 3 หลายเดือนก่อน +1

    Thanks, all work!

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

      welcome!

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

    Patiently waiting for tutorial #8

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

      They come out every Wednesday

  • @yohumano1863
    @yohumano1863 3 วันที่ผ่านมา

    Muchas gracias, el tutorial me sirvió bastante

    • @Codemycom
      @Codemycom  3 วันที่ผ่านมา +1

      Welcome

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

    Thanks a lot!!!

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

      welcome!

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

    Im finally caught up! Cant wait for the next video release... John is the full training for ecom available for purchase on the site at all?

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

      Not yet, we're building this as we go...

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

    hy nice video man...thanks a lot.please upload the next video8.we are waiting

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

      These come out every Wednesday

  • @NourFares-so7rr
    @NourFares-so7rr 8 หลายเดือนก่อน

    👏👏

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

    Genius!

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

      Thanks!

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

    Greate!!!!

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

      Thanks!

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

    in the form's action attribute , vs code suggesting lowercase 'post' or it should be "POST"

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

      It should be as written in the video, obviously that worked. Never take vs code suggestions when you don't know why it's suggesting it.

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

    Great video ,
    But i have a problem , messages appear on the admin section when i login or logout 😔

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

      what did you do differently from the videos?

    • @38_jobinluckose50
      @38_jobinluckose50 2 หลายเดือนก่อน +1

      Same here😢

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

      @@38_jobinluckose50 i added a bootstrap link in html and it works

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

      samee

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

      @@ic3dl4tte You should add bootstrap link . I tried it and it works

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

    thank for your video, btw, at 6:38, you used logic "user.is_authenticated", where is it from ?

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

      That's a built in feature of Django.

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

    login working only for superuser that was created from django-admin createsuperuser command but it does not work for another users
    please solve this problem

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

      Solve it yourself lol rewatch the videos and follow them exactly and it will work. You did something wrong, I can't guess what.

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

      @@Codemycom Thanks for replying but it gives me error of password similar to first and last name thanks again can you please create a video on how student can deploy django project on AWS free

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

    Why would my login button not work? When I click the button, nothing happens...

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

      You left out something, probably on the HTML form.

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

    When you upload next video for this tutorial

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

      The series is called Django Wednesdays...so....