Django Login and Registration | Django Authentication | Crash Course Tutorial | Rohan Yeole

Поділитися
Вставка
  • Опубліковано 4 гру 2024

КОМЕНТАРІ • 133

  • @mvega8712
    @mvega8712 9 місяців тому +2

    Please create more tutorials like this one... pretty impressive and straightforward

  • @SiyaSharma-u2t
    @SiyaSharma-u2t 8 місяців тому +3

    How to update the page for the note sharing app

    • @rohan-yeole
      @rohan-yeole  8 місяців тому +2

      Pass on the I'd in url, use that id in function based view, with method of quesryset
      Somemodel.objects.filter(id=id).update(field=value).
      You must use PUT method of request to do this.

  • @juanjosechamorro1615
    @juanjosechamorro1615 4 місяці тому +3

    If you have some error with logut the last version has differents problems with this, I recomend you django 4.2 version

    • @rohan-yeole
      @rohan-yeole  2 місяці тому +1

      4.2 is more stable than latest.

  • @VeeraBhadraGuptaCharugalla
    @VeeraBhadraGuptaCharugalla 10 місяців тому +3

    Sir, whit what details you have logged in at 15:37 min

    • @meet.krunalrana
      @meet.krunalrana 8 місяців тому

      you have to crate user using Django commands

    • @rohan-yeole
      @rohan-yeole  8 місяців тому +1

      use python manage.py createsuperuser to create user.

    • @AdarshVK-g1q
      @AdarshVK-g1q 4 місяці тому

      it's not working can you send correct code to create user

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

    The best video on the topic so far

  • @cutecatstv26
    @cutecatstv26 4 місяці тому +1

    This is very useful for me, create more like this

  • @SiyaSharma-u2t
    @SiyaSharma-u2t 8 місяців тому +1

    Sir please make a one short for note sharing app using django

    • @rohan-yeole
      @rohan-yeole  8 місяців тому

      can you elaborate? didn't get it. you mean youtube short?

  • @joswinemmanuel
    @joswinemmanuel 7 місяців тому +1

    Sir when I do /accounts/logout/ at 15:50 , it is not redirecting to Django administration Logged out, but showing 'This page is not working HTTP ERROR 405'... Sir can you help me.... Tell me why

    • @joswinemmanuel
      @joswinemmanuel 7 місяців тому

      Sir problem was solved when I installed Django 4.2.8... Frist Django 5.0.4 was installed... That caused the error

    • @rohan-yeole
      @rohan-yeole  7 місяців тому

      this is nice. generally use django version 4.0 or 4.1, they are stable now

    • @thatomashalaba6965
      @thatomashalaba6965 6 місяців тому

      @@rohan-yeole I changed my install to 4.1 and 4.2.8 but still getting Method Not Allowed (GET): /accounts/logout/

  • @rcteejay1436
    @rcteejay1436 Місяць тому

    Bro can u help me..I got stuck in the middle of sign up page 16:30

  • @rohithgowdax
    @rohithgowdax 4 місяці тому +1

    Thank You so Much sir 😍

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

    it cannot direct render home How can slove the problem??

  • @Dhruv-f6b
    @Dhruv-f6b 2 місяці тому

    hi sir, @15:42 when you sign in, you get redirected to the home.html page and later when you sign up, you get redirected to the sign in page. I'm not getting redirected in both cases. Will this issue be solved if I change the django version as I'm using the latest 5.1.1 version.

    • @rohan-yeole
      @rohan-yeole  2 місяці тому

      It's not an version issue...make sure you added redirect constant in setting file for logout.

  • @Gurukul-sm
    @Gurukul-sm 3 місяці тому

    Teach fully advance django.custom login, logout , register, Middle were,group middle were,jet,rest API nd advance topics

  • @AhmadMousavi-pp5xr
    @AhmadMousavi-pp5xr 4 місяці тому

    thanks its great but when i login at 15:50 , this error comes: TemplateDoesNotExist at / what can i do? i followed your actions

    • @rohan-yeole
      @rohan-yeole  4 місяці тому

      do you created html files in templates folder? can you re-check?

  • @AdarshVK-g1q
    @AdarshVK-g1q 4 місяці тому +1

    please tell how to create user

  • @SATHISHKUMAR-hg5et
    @SATHISHKUMAR-hg5et 4 місяці тому

    in the video you didn't complete the if else loop but how it is working for you

    • @rohan-yeole
      @rohan-yeole  4 місяці тому

      which if else? any context?

  • @crclub
    @crclub 3 місяці тому

    Do i need to set the project in virtual box ?

  • @SATHISHKUMAR-hg5et
    @SATHISHKUMAR-hg5et 4 місяці тому +1

    the github link is not working

    • @rohan-yeole
      @rohan-yeole  4 місяці тому

      Thanks for letting me know. I have update in description. sharing here too github.com/yeole-rohan/User-Authentication-and-User-Signup-in-Python-using-Django-/tree/main

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

    I have a doubt without creating database directly we can store new users

  • @meet.krunalrana
    @meet.krunalrana 8 місяців тому

    why did you jump steps , need to add user creation steps 15:38

    • @rohan-yeole
      @rohan-yeole  8 місяців тому

      Might have missed to show in video while editing.

    • @AdarshVK-g1q
      @AdarshVK-g1q 4 місяці тому

      can you tell how to add user in this sir

  • @nandithass7326
    @nandithass7326 10 місяців тому

    9:13 csrf is not working for me . showing templae does not exist

    • @rohan-yeole
      @rohan-yeole  9 місяців тому

      Sid you restarted the server after creating an html file. Django server doesn't know if a new file is created!

  • @Zarakkahnn
    @Zarakkahnn 8 місяців тому +1

    Honestly I'm trying to follow each and every step but when i see an error it angers me a lot. I don't know what's the problem whenever i try to do something it never gets completed. In this tutorial when you do something it goes well but when i do it something pops up

    • @rohan-yeole
      @rohan-yeole  8 місяців тому

      what is happening?

    • @Zarakkahnn
      @Zarakkahnn 8 місяців тому

      @@rohan-yeole i had an html login page with a simple for ... I added the csrf_token in the form and it is showing it in the Html browser view as a text. Next i had created another page Dashboard.html where when i click on the Sign In button on the login.html page it would redirect it to the dashboard.html. but it is showing some error says template does not exist at accounts/login

    • @SufficientDaikon
      @SufficientDaikon 8 місяців тому +1

      that's just the nature of being a programmer, encountering errors is the only constant

  • @kevinpassey2657
    @kevinpassey2657 19 днів тому

    Hi, Just tried this - I can't get passed protecting the home page...the re-direct does not work..I've checked and checked the code. Any thoughts - all i get is a re-direct directly to the home page and no prompt to login

    • @rohan-yeole
      @rohan-yeole  16 днів тому

      Hi did you tried login_required decorator on home page view?

    • @kevinpassey2657
      @kevinpassey2657 15 днів тому

      @@rohan-yeole yes I did..thanks anyway - i've moved on now.

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

    The submit button for login page isn't working after signing up

  • @VeeraBhadraGuptaCharugalla
    @VeeraBhadraGuptaCharugalla 10 місяців тому

    With what details you have logged in at 15:37

    • @thorodinson8187
      @thorodinson8187 9 місяців тому

      What did you put , mine is not working

    • @AdarshVK-g1q
      @AdarshVK-g1q 4 місяці тому

      yes for me too it's not working

  • @michaelsaragena8750
    @michaelsaragena8750 22 дні тому

    hey when Iogout it says this page is not working http error 405

    • @rohan-yeole
      @rohan-yeole  16 днів тому

      It means method not allowed. Check which method your are getting.after logout it should be GET http method.

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

    github page is not working ..could u give correct one

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

    nice video ver educational
    can you please do one with top verification

    • @rohan-yeole
      @rohan-yeole  5 місяців тому

      Okay..Will see if time permits....cheers

  • @JainyVarghese
    @JainyVarghese 6 місяців тому

    sir, from the login page I can't go to the home page. it says page not found. please help me sir, I got stuck here.

    • @rohan-yeole
      @rohan-yeole  6 місяців тому

      did you added login_redirect_url = '/' in settings file?

    • @jainmaria5630
      @jainmaria5630 6 місяців тому

      @@rohan-yeole I updated the settings, and now it is working fine. Thank you so much for the excellent video. Hope we get more videos in the future.

    • @AdarshVK-g1q
      @AdarshVK-g1q 4 місяці тому

      can you send proper code to update there

  • @sufiyan.b7214
    @sufiyan.b7214 4 місяці тому

    Logout 405 error /Same problem sir can you show the def function of logout and logout.html file

  • @thehindu9972
    @thehindu9972 6 місяців тому

    Bro can u pls share your video link : Django Deployment

    • @rohan-yeole
      @rohan-yeole  6 місяців тому

      what exactly "Django Deployment" on?

    • @thehindu9972
      @thehindu9972 6 місяців тому

      @@rohan-yeole anyone bro but I want to make my project into live 😞 share one best vidoe

    • @rohan-yeole
      @rohan-yeole  6 місяців тому

      @@thehindu9972 here its a free platform ua-cam.com/video/-5Ft9WOWPGQ/v-deo.htmlsi=x8vcRC6zdEuvbC0o

  • @harshalshah1058
    @harshalshah1058 9 місяців тому

    static not working for me in link href line of base.html...how to resolve this?

    • @rohan-yeole
      @rohan-yeole  9 місяців тому

      {% load static %} add this tag after head tag.

    • @harshalshah1058
      @harshalshah1058 9 місяців тому

      @@rohan-yeole already added..still giving error

    • @rohan-yeole
      @rohan-yeole  9 місяців тому

      @@harshalshah1058 could share code in comment, base.html

  • @AnithaPoly
    @AnithaPoly 7 місяців тому

    sir from signup page not redirecting to login page

    • @rohan-yeole
      @rohan-yeole  7 місяців тому

      please check redirect from signup view, should be "login"

  • @salwanoor1809
    @salwanoor1809 6 місяців тому

    Hello. I don't know why in my views.py return render(request,"home.html", {}) comes with exception thrown 'base' is not a registered namespace. Please help me out on this.

    • @rohan-yeole
      @rohan-yeole  6 місяців тому

      This you created base.html file?, I think not, make sure you have that in templates folder

  • @studentcodehub9602
    @studentcodehub9602 10 місяців тому

    I cannot open my signup page I have this Error: 'WSGIRequest' object has no attribute 'thod'

    • @rohan-yeole
      @rohan-yeole  10 місяців тому

      When did you get this error?

    • @studentcodehub9602
      @studentcodehub9602 10 місяців тому

      @@rohan-yeole
      I'm having this error:
      ==============error===================
      AttributeError at /signup/
      'WSGIRequest' object has no attribute 'thod'
      Django Version: 3.2.9
      Python Version: 3.10.0
      Installed Applications:
      ['django.contrib.admin',
      'django.contrib.auth',
      'django.contrib.contenttypes',
      'django.contrib.sessions',
      'django.contrib.messages',
      'django.contrib.staticfiles',
      'base']
      Installed Middleware:
      ['django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware']
      ==============error===================
      Am I missing referrences? like applicaation to install in pip? or is it the version of python I'm using?

    • @studentcodehub9602
      @studentcodehub9602 10 місяців тому

      @@rohan-yeole when I implement this code:
      if request.thod == "POST":
      # form = UserCreationForm(request.POST or None)
      # if form.is_valid():
      # form.save()
      # username = form.cleaned_data.get('username')
      # else:
      # form = UserCreationForm()
      # return render(request, "registration/signup.html", {"form": form})
      but whit this no error:
      def authView(request):
      form = UserCreationForm()
      return render(request, "registration/signup.html", {"form": form})

    • @studentcodehub9602
      @studentcodehub9602 10 місяців тому

      @@rohan-yeole after I implement this:
      def authView(request):
      if request.thod == "POST":
      form = UserCreationForm(request.POST or None)
      if form.is_valid():
      form.save()
      username = form.cleaned_data.get('username')
      else:
      form = UserCreationForm()
      return render(request, "registration/signup.html", {"form": form})
      =======================================================================
      but this I have no error:
      def authView(request):
      form = UserCreationForm()
      return render(request, "registration/signup.html", {"form": form})

    • @aniBunny12378
      @aniBunny12378 7 місяців тому +1

      Did you mean to write method*

  • @VapTex
    @VapTex 6 місяців тому

    it is not logging out , sadly doesnt work

    • @rohan-yeole
      @rohan-yeole  6 місяців тому

      Does other URLS works for you? what error you faced?

  • @krisuu4106
    @krisuu4106 8 місяців тому

    how did u do /accounts/logout/ at 15:50 , for me its not working

    • @rohan-yeole
      @rohan-yeole  8 місяців тому

      here you can find all routes
      docs.djangoproject.com/en/5.0/topics/auth/default/#module-django.contrib.auth.views

  • @sachinprasad7594
    @sachinprasad7594 7 місяців тому

    Redirect kaha se aya

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

    Rohan username password button not showing up after changing signup.html file

    • @rohan-yeole
      @rohan-yeole  Рік тому

      Can you specify at what part of time and what you have changed?

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

      @@rohan-yeoleafter updating sign up.html and login.html after 9:13 I’m unable to see username sign up submit form on front end it shows Template doesn’t exist at signup where I wrote the same code as you mentioned in signup and login file

    • @rohan-yeole
      @rohan-yeole  Рік тому

      For signup as u mentioned you will have to create a form. If you follow ahead you will be able to create a form and can see it on frontend. For template not exist make sure in view provided correct path in render method. Additionally in settings file, to templates block make sure to add BASE_DIR / "templates". Hope this will help. I urge you go over all tutorial. Your doubt will be solved. Thanks

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

      @@rohan-yeolethanks signup is working now I didn’t created template/registration directory, now it works thanks

    • @nandithass7326
      @nandithass7326 10 місяців тому

      @@DATA_MACHINE22 what?

  • @ramakanttiwari835
    @ramakanttiwari835 9 місяців тому

    My logout functionality is not working

    • @rohan-yeole
      @rohan-yeole  9 місяців тому

      what is actual error you are getting?

  • @thorodinson8187
    @thorodinson8187 9 місяців тому

    Whats the username and password??

    • @rohan-yeole
      @rohan-yeole  9 місяців тому

      the one you have created. through --
      python manage.py createsuperuser

    • @thorodinson8187
      @thorodinson8187 9 місяців тому

      @@rohan-yeole I registered and then logged in , then it worked . I was directly trying to login(was my mistake) , anyways thanks for the video it was great👍

    • @cheddaberetta11
      @cheddaberetta11 8 місяців тому +1

      @@rohan-yeole How would you get the registration page to automatically make that superuser for you?

    • @AdarshVK-g1q
      @AdarshVK-g1q 4 місяці тому

      ​@@rohan-yeoleplease tell how to create user

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

    struck in 7.33

  • @crisp9734
    @crisp9734 10 місяців тому

    bro remove signup warnings ofc no one like this warning

    • @rohan-yeole
      @rohan-yeole  10 місяців тому

      Okay...but as learner person should know. Removing it may vary depending upon requirements.

  • @nandithass7326
    @nandithass7326 10 місяців тому

    after updating sign up.html and login.html after 9:13 I’m unable to see username sign up submit form on front end it shows Template doesn’t exist at signup where I wrote the same code as you mentioned in signup and login file.

    • @rohan-yeole
      @rohan-yeole  10 місяців тому

      Template doesn’t exist ----> this may come if you havn't added or added but didn't restarted server. please check this.

    • @Niketha-c6g
      @Niketha-c6g 10 місяців тому

      I m getting the webpage but csrf nd {{form}} is being displayed there with submit button. No username and password

    • @rohan-yeole
      @rohan-yeole  10 місяців тому

      @@Niketha-c6g can you discribe this "No username and password", is it label or something else?

    • @Niketha-c6g
      @Niketha-c6g 10 місяців тому

      I meqn i am not getting those when i load my webpage

  • @ajimccullum2837
    @ajimccullum2837 10 місяців тому

    Sir ,I have one doubt, please give the you mail??

  • @QuangThangTa-qi1zc
    @QuangThangTa-qi1zc 6 місяців тому

    it is not logging out , I got HTTP ERROR 405 error

  • @9GameCastGameTv
    @9GameCastGameTv 10 місяців тому +1

    thx

  • @Gurukul-sm
    @Gurukul-sm 3 місяці тому +1

    Teach fully advance django.custom login, logout , register, Middle were,group middle were,jet,rest API nd advance topics

    • @rohan-yeole
      @rohan-yeole  2 місяці тому

      thanks for suggestions, will do in sometime

  • @QuangThangTa-qi1zc
    @QuangThangTa-qi1zc 6 місяців тому +2

    it is not logging out, I got HTTP ERROR 405

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

      Create a form of logout and set the method to post

    • @sufiyan.b7214
      @sufiyan.b7214 4 місяці тому

      Logout 405 error /Same problem sir can you show the def function of logout and logout.html file

    • @crclub
      @crclub 3 місяці тому

      ​@@MerinaFidelis after that only that error

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

      Check url and in the form

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

      The logout _user is my url path for logout view. logout(request) is inbuilt function.
      def logout_user(request):
      logout(request)
      messages.success(request, "Logged Out")
      return render(request, login.html)