Django Tutorial #28 - Checking Login Status

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024
  • DONATE :) - www.paypal.me/...
    ----- COURSE LINKS:
    Python tutorials - goo.gl/xD2AvX
    Course files - github.com/iam...
    Django docs - docs.djangopro...
    Atom editor - atom.io/a
    CMDER - cmder.net/
    ======== Other Tutorials =========
    ----- NODE.JS TUTORIALS
    • Node JS Tutorial for B...
    ----- MONGODB TUTORIALS
    • MongoDB Tutorial for B...
    ----- SUBSCRIBE TO CHANNEL - / @netninja
    ======== Social Links ==========
    Twitter - @TheNetNinja - / thenetninjauk
    Patreon - / thenetninja

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

  • @geralddarkobekoe
    @geralddarkobekoe 4 ปีที่แล้ว +5

    Almost finished,it's been wonderful series so far,a million thanks sir

  • @lolag3r3r
    @lolag3r3r 6 ปีที่แล้ว +6

    'Swanky' lmao
    Loved the whole series! Thank you for making these tutorials! They're pretty awesome!

  • @firstnamelastname7248
    @firstnamelastname7248 6 ปีที่แล้ว +7

    Here is code to display current logging name.
    {% if user.is_authenticated %}
    Welcome, {{ user.username }}. Thanks for logging in.
    {% endif %}

  • @georgebanks5521
    @georgebanks5521 5 ปีที่แล้ว +5

    "alright then so things are looking pretty swanky so far" is my new favorite thing to say (jk). Your tutorials are great man keep up the great work. I was wondering if you could make a Flask tutorial too in the future :)

  • @shadiismailalzouabi1035
    @shadiismailalzouabi1035 4 ปีที่แล้ว

    It is still going smoothly, thanks, Sir.

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

    In user.is_authenticated What is the word "user" referencing exactly? Thank you.

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

    How can we access the "user" object in the template? Shouldn't we pass it within the dictionary from the views.py file or has it a global scope?

    • @nas8318
      @nas8318 5 ปีที่แล้ว

      This should answer your question: stackoverflow.com/questions/31896103/how-does-template-in-django-get-the-user-object

  • @isaacimafidon6837
    @isaacimafidon6837 6 ปีที่แล้ว

    Great video keep it up. Thanks i love them all.

  • @DenizBazan
    @DenizBazan 6 ปีที่แล้ว

    Great Tutorial thanks

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

    Please can you do how to create a custom login/signup form with extra more fields?

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

      here you're docs.djangoproject.com/en/2.0/topics/auth/customizing/

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

      ElGovanni thanks mate

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

    great series, but i'm confused why do we need Front-end then ? like React ? and when i see React i'm like why do we need backend Lmao
    like for me we can do everything with django...
    It will be cool a series on how to connect front-end and back-end ? like React + node

  • @sujan_np
    @sujan_np 5 ปีที่แล้ว

    why my template tag is not working inside base_layout.html. This is the actual problem I am dealing with.

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

      Answer: You don't have a space between the tag name url and the parameter 'accounts:login', so Django interprets it as one token. It's also customary to use spaces after the opening tag and before the closing tag, to increase readability, so you'd get {%url 'accounts:login'%}... Thankyou

  • @AxmedShiimax
    @AxmedShiimax 6 ปีที่แล้ว

    can i use logout button as *

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

      Nope ,because you've to send a post request

    • @alexanderislas4382
      @alexanderislas4382 4 ปีที่แล้ว

      @@amongdoomers9464 could you have all the links as buttons?

    • @amongdoomers9464
      @amongdoomers9464 4 ปีที่แล้ว

      @@alexanderislas4382 I didn't get it.Explain please

    • @alexanderislas4382
      @alexanderislas4382 4 ปีที่แล้ว

      @@amongdoomers9464 So how, the video was made, the logout button is different. Why didn't he make all the links as buttons?

    • @amongdoomers9464
      @amongdoomers9464 4 ปีที่แล้ว

      @@alexanderislas4382 Whenever you want to send/get a post request we should use form with submit input inside it. Other wise ,there'll be no need to make links as butttons .Hope I answered your question, if not please clarify

  • @Lbmaniak
    @Lbmaniak 6 ปีที่แล้ว

    thx

  • @DuongTran-zh6td
    @DuongTran-zh6td 2 ปีที่แล้ว

    1:55 them code de check Login Status

  • @wisamkhalid5663
    @wisamkhalid5663 6 ปีที่แล้ว

    Thaaaaaaaaaaaaaaaaaaaaaanks

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

    ANDROID TUTORIALS PLEASE ?????????????????