Django Tutorial - Login, Logout and User Authentication

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 56

  • @abdullahatif7854
    @abdullahatif7854 4 роки тому +7

    Dude ! You are awesome.
    I was stuck at the login redirect problem for days and you just solved it in about 6 minutes.
    Love you for that.

    • @zachfenton608
      @zachfenton608 3 роки тому +1

      Still tried it but it doesn't like it

  • @piyush6631
    @piyush6631 4 роки тому +4

    Your tutorials are awesome. They're so clear and concise thanks for making them.

  • @manthanguptaa
    @manthanguptaa 3 роки тому +5

    Something acts weird
    Tim : *chuckles nervously*

  • @BLXCKXNG
    @BLXCKXNG 2 роки тому

    tec with tim, i love you bro!! cheers from Chile

  • @RobThompsonRealtor
    @RobThompsonRealtor 3 роки тому +1

    Love your work. Thanks, Tim!!!

  • @rayganmudberry375
    @rayganmudberry375 5 років тому +6

    Tim, you are doing great job. please make more and more videos on python. coz python is everywhere these day. please make zero to hero python course. thank you. god bless you buddy.

    • @JK360noscope
      @JK360noscope 4 роки тому

      You are zero and should feel zero.
      Go take the Google course

  • @imadelachiri5475
    @imadelachiri5475 4 роки тому +6

    you can solve the problem by using this : {% if user.is_authenticated or request.path == "/login/" %}

    • @andrektm
      @andrektm 2 роки тому

      perfect. did it, and its work!

  • @Wurstfinger-rl1zi
    @Wurstfinger-rl1zi 5 років тому +7

    Django just kicks you everything in da face while with Flask you have to write a jwt authentication yourself... just perfect!

  • @1nduck
    @1nduck 5 років тому +10

    Tim, I wish you the best with your youtube channel. May I ask you if you've finished this django series and, if so, how many more episodes are left?

    • @TechWithTim
      @TechWithTim  5 років тому +8

      There are two episodes left! The last one will be deployment. Thank you :)

    • @Noolemans
      @Noolemans 3 роки тому

      @@TechWithTim Hi Tim, first of all thanks for the tutorials. You have helped out tremendously. Do you still consider making the deployment episode? In any case, thank you

    • @AnnaIsHere
      @AnnaIsHere 3 роки тому

      @@TechWithTim Ok, that was 2 years ago. Will it happen?:)

  • @Didi-jo5gr
    @Didi-jo5gr 4 роки тому

    your user authentication help me very much. THANKS!

  • @weixiangng8279
    @weixiangng8279 5 місяців тому

    Nice tutorial you got there, how about implementing LDAP login with active directory?

  • @kevinbevil6989
    @kevinbevil6989 4 роки тому

    Suuuper helpful, thanks man

  • @jesulayomy
    @jesulayomy Рік тому +3

    If your /logout route shows a method not allowed error (access denied) , Django 4.1 deprecates logging out via GET.
    Djangoproject docs uses a form (with csrf) with a button styled as a link.

    • @aarchipriyadarshani9108
      @aarchipriyadarshani9108 27 днів тому +1

      what should we do to make logout page work

    • @jesulayomy
      @jesulayomy 27 днів тому +1

      A post request to logout should work, I don’t remember it much but in my code I had a form with logout button using POST request:
      “””
      {% csrf_token %}
      Logout
      “””

    • @aarchipriyadarshani9108
      @aarchipriyadarshani9108 27 днів тому

      @jesulayomy thanks

  • @soorajkp9615
    @soorajkp9615 2 роки тому

    It helped me Thank u

  • @PlaneToTheBrainES
    @PlaneToTheBrainES 5 років тому +1

    Minute 11:11 , why is it not redirecting to the login page on the Login Here link? Great content. Keep up the good stuff.
    PD: Okay, I understand now. I leave the question just in case someone has the same doubt.

  • @sergey5551
    @sergey5551 3 роки тому

    Great content!

  • @saharamanson1970
    @saharamanson1970 4 роки тому

    Nice bro keep it up........

  • @mennatullahabdelrahman3840
    @mennatullahabdelrahman3840 Рік тому

    Tim be like: oh it doesn't work? just forget about it hahahah

  • @thetruereality2
    @thetruereality2 4 місяці тому

    Where do we specify the location of login.html? In your case you created this inside registration folder so auth view function will try to look for template located at "registration/login.html" but I don't see you specifying this location anywhere in url_patterns. Could you explain that a bit ?

  • @Heresjaken
    @Heresjaken 4 роки тому +2

    Not sure why but for some reason Django was giving an error saying that it could not find the file under mysite/main/registration - I moved the folder into that location and it works

  • @ariannaschelfi376
    @ariannaschelfi376 3 роки тому +1

    Hi Tim! Thank for the video. I have a question: how can I remove the autocomplete from the login fields?

  • @basmulder3588
    @basmulder3588 5 років тому +1

    Csrf token is a token that prevents cross side request forgery.

  • @sebastianeckhart6991
    @sebastianeckhart6991 3 роки тому +1

    basically 13 min tutorial that doesn't have a useful solution. I dont get why like to dislike ratio is so good

  • @rohandarji2001
    @rohandarji2001 3 роки тому +1

    In my login form the input fields and labels are not visible. What could be the reason?

  • @dewangbhavsar7443
    @dewangbhavsar7443 2 роки тому +1

    I'm doing everything the way Tim shows but I can't get my form to display the Crispy format. Anyone can help? I can share my code.

  • @menkiguo7805
    @menkiguo7805 3 роки тому

    Is Django goog to create some app with separated from and back end?

  • @elishashmalo3731
    @elishashmalo3731 5 років тому +1

    Could you make a tutorial series for the library pymunk using pygame? No one has done it yet on YT

  • @abdulwadudkhan684
    @abdulwadudkhan684 11 місяців тому +1

    Hello tim the way you add crispy in previous i follow it but it gives same error all time I try to resolve it but I can't do that I saw documention of django but it doesn't work plzz make a video on it or tell me how to do it I am gonna piss off from last video

    • @blackrose3934
      @blackrose3934 2 місяці тому

      Hey, I also faced the same issue, but resolved it later on. Someone named @CryseHD actually commented a solution for it on the previous video. You can find it when u go to the newest comments, their comment is the 4th newest comments. I hope that will help you!

  • @guyfrd8638
    @guyfrd8638 4 роки тому

    a little problem for me i can't use crispy. I mean if i use the tim's code i have this error "Could not parse the remainder: '│crispy' from 'form│crispy'" and if i use {% crispy form %} crispy works but my buttons doesn't work. Any idea?

    • @rakshanaravindran9809
      @rakshanaravindran9809 2 роки тому +1

      After block content give indentation like in python ur problem will be rectified

  • @arifurrahmanarif241
    @arifurrahmanarif241 4 роки тому

    can i add email field in the login form?

  • @chidiohiri
    @chidiohiri 4 роки тому +1

    The logout function isn’t working! How do I solve this

    • @arifurrahmanarif241
      @arifurrahmanarif241 4 роки тому

      if you just type url as 127.0.0.1/8000/logout it will work. For using in template, just use
      also use csrf token if necessary. you can use it outside a form.
      i am a noob in django, so there may occur some issues

  • @surajtyagi676
    @surajtyagi676 5 років тому

    Hey tim i am facing an error in html file on "{ % endblock % } " , can you help me out on this?

  • @sainco3036
    @sainco3036 5 років тому

    thanks.

  • @drueprofessor
    @drueprofessor 5 років тому

    What keyboard do you have

  • @dinindutheekshana2254
    @dinindutheekshana2254 3 роки тому

    Can i have source code for this

  • @khmshorts8567
    @khmshorts8567 3 роки тому +1

    bro i am not getting login form?how can i solve this?

  • @sergeikrasnovskii9767
    @sergeikrasnovskii9767 4 роки тому

    Thank you so much man =)) your Tutorial was very helpful ==))) like and subscribe from me =)

  • @arifurrahmanarif241
    @arifurrahmanarif241 4 роки тому

    i wonder how come this video has so few likes?
    didn't people taking CS50 online course got stuck in registration?
    anyone from CS50 python & django course?

  • @saharamanson1970
    @saharamanson1970 4 роки тому

    Nice bro keep it up........

  • @saharamanson1970
    @saharamanson1970 4 роки тому

    Nice bro keep it up........

  • @saharamanson1970
    @saharamanson1970 4 роки тому

    Nice bro keep it up........