How to Create a Login System in Python Using Django? | Python Projects | GeeksforGeeks

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 428

  • @GeeksforGeeksVideos
    @GeeksforGeeksVideos  11 месяцев назад +6

    For more such Projects check out our Playlist: ruclips.net/p/PLqM7alHXFySExPLJSzpKfKe6JO44Qm0qj&si=Tpg_3fu2oZI19FA7

  • @pg2273
    @pg2273 2 года назад +33

    13:11 Very well explained
    23:57 35:51 Must
    45:51 Gmail verification

  • @Tony-pk1vb
    @Tony-pk1vb 2 года назад +75

    Just for info, force_text has been depreciated in django 4, instead use force_str

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Yes, thanks!

    • @notchippy
      @notchippy 2 года назад +1

      what about this one SMTPAuthenticationError at /signup

    • @fazilasayed375
      @fazilasayed375 2 года назад +1

      so where all do we have to make the changes?

  • @TanujKalraVlogs
    @TanujKalraVlogs 2 года назад +33

    9:36
    To avoid copying files back to main gfg folder.
    Give django-admin startproject gfg . (after project name give a space and dot(.)). it will create only one folder with all files.

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +1

      Yes💯

    • @laraibkhan2517
      @laraibkhan2517 2 года назад +1

      That I always use😁

    • @oviemennu169
      @oviemennu169 2 года назад

      i keep getting this error when i try to run ''ModuleNotFoundError: No module named 'gfg.settings''
      can anyone help me with resolving this error?

  • @thecanadian6145
    @thecanadian6145 9 месяцев назад +2

    Dude's a pro at entering his details

  • @DheerajKadu-e7w
    @DheerajKadu-e7w Год назад +1

    Perfect voice perfect step by step explanation no mixing clear idea Thank you so much sir👍

    • @mohan_chandraa
      @mohan_chandraa Год назад +1

      ​@@AnubhavMadhav
      Hello bro!!
      Less secure apps is no longer working, Is there any alternative?

  • @metricfruit
    @metricfruit 2 года назад +7

    Dude your "left-click + alt" key shortcut is a game changer (and I thought the video itself was already great -- this is the cherry on top!)

  • @dineshbabujalla
    @dineshbabujalla 3 года назад +31

    Excellent explanation brother,
    well understood,
    and i successfully completed my first project as a beginner with your help
    My sincere thanks to,
    GeeksforGeeks
    and Anubhav brother
    for nice explanation..

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Thank you so much bro! Happy to help 💖

    • @victorynwokejiobi1762
      @victorynwokejiobi1762 2 года назад

      Please let's link up via email. So you can put me through. I'm facing some challenges on my sign up page

    • @kohlintr7180
      @kohlintr7180 6 месяцев назад

      I got an error at signup page,could you send reply to my msg

  • @TheMrchement
    @TheMrchement Год назад +6

    Finally someone made a python tutorial, I've been looking for it for a long time, thanks brother

  • @adeniyiladenegan7450
    @adeniyiladenegan7450 2 года назад +10

    Amazing job...I need you to know what you already know, "People like you are simply Blessing to humanity"
    Gonna be watching again. THANK YOU!!

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +1

      Thank you so much ❤️ It means a lot ✨

  • @NainaShukla-nq6um
    @NainaShukla-nq6um 7 месяцев назад +3

    Thank you so much sir 😭💖💖

  • @kenkioqqo
    @kenkioqqo Год назад +3

    Anubhav Madhav, you are the man! This is the best Django Authentication tutorial I've come across anywhere. The only one that has worked for me. I can't thank you enough ma man. Blessings!

    • @AnubhavMadhav
      @AnubhavMadhav Год назад

      Thanks man, and you're welcome!

    • @harshrajyoutube
      @harshrajyoutube 9 месяцев назад

      Bro it showing cannot import name ' force_text' from 'Django.utils.encoding'😢

  • @krishpatel_2383
    @krishpatel_2383 Год назад +3

    great tutorial.
    Everything is well explained.
    My sincere thank you to gfg and Anubhav Madhav.

  • @mukeshgaur4263
    @mukeshgaur4263 2 года назад +1

    best lecture for the django login with database and gmail confimation thankyou

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад

      Thank you Mukesh! ✨

    • @AP-qg9ss
      @AP-qg9ss 2 года назад

      @@AnubhavMadhav google no longer allows less secure apps settings to turn on 46:00 . i was following the video and doing this project. can i still go throw with this video or is there a workaround?

  • @smarter_by_bit9346
    @smarter_by_bit9346 3 года назад +3

    Django is getting more and more famous damn fast.

  • @shreyash462
    @shreyash462 10 месяцев назад +3

    Simple and Concise , props gfg !

  • @sauravgupta7705
    @sauravgupta7705 2 года назад +19

    It's really helpful thanks for making this video.
    While running your code I did such improvements, Please check.
    -> In email_confirmation.html there is a type error in your tutorial i.e you typed "uid64" instead of "uidb64"
    -> And "force_text" is not working for me therefore i used "force_str"
    And thanks again for this wonderful and helpful tutorial.

    • @oviemennu169
      @oviemennu169 2 года назад

      i keep getting this error ModuleNotFoundError: No module named 'gfg.settings'
      can anyone help me with resolving this error?

    • @hilariousgirlgaming6145
      @hilariousgirlgaming6145 2 года назад

      @@oviemennu169 you should put your project-name.settings not gfg.settings . gfg is his project's name

    • @zend969
      @zend969 Год назад

      am getting Reverse for 'activate' with keyword arguments '{'uidb64': '', 'token': ''}' not found. 1 pattern(s) tried: ['activate/(?P[^/]+)/(?P[^/]+)\\Z'] using Django v4

    • @adamstbright7241
      @adamstbright7241 Год назад

      I am gettiing the same error. Kindly share if you have solution to this @@zend969

    • @Wwatermelony
      @Wwatermelony 9 месяцев назад

      how did you solve it please ? i'm getting the same error
      @@zend969

  • @BeautyGlory
    @BeautyGlory Год назад +1

    Boss you made my night many people couldnt explain well what i need now is password change

  • @bilallrh
    @bilallrh 2 месяца назад +1

    Impressive and commendable. Thank you.

  • @zachfenton608
    @zachfenton608 2 года назад +12

    Excellent tutoroial but i see you forgot to mention a step which prevented the HTML text from appearing after you put in the templates folder under authentication. You have to go into the settings under 'dirs' [] and add 'templates'

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +6

      Thank you so much ✨
      Well I mentioned that at 18:37 , you might have missed it no problem😊👍

    • @tembomedia6902
      @tembomedia6902 Год назад +1

      @@AnubhavMadhav Hello, I tried this and it's still not removing the django page. What might be the problem. Am I overlooking something? Please help

  • @michaelwarner5277
    @michaelwarner5277 Год назад +7

    Very excellent tutorial. This is extremely thorough.

  • @Ranji544
    @Ranji544 Год назад +4

    Sir please mention the extensions you have used in VS Code for this video. I am not getting some code suggestions for import statements in django in quick fix

  • @parthib_deb23
    @parthib_deb23 Год назад

    very excellent video but one addition to this video is that , template inheritance may be applied for better html handling thought here frontend is not main to teach!!

  • @aayusharmaah
    @aayusharmaah 3 года назад +23

    Wow! This was very helpful, thank you for this video ❤️

  • @jasurbekxamroyev2399
    @jasurbekxamroyev2399 2 года назад +1

    Video is so amazing, however it's old. I mean turning ON the less secure apps is getting problem.

  • @DARKKNIGHT-qe5bm
    @DARKKNIGHT-qe5bm 2 года назад +22

    google removed less secure apps function, now how to do the email verification?

    • @rexmatrix1208
      @rexmatrix1208 Год назад

      Sir u found any way

    • @lalitagarwal9155
      @lalitagarwal9155 Год назад +5

      Just enable 2 factor authentication in your Google account and after enabling you will get an option of creating app. Now create a app with any name you like and after that you will get 16 characters password just copy it and paste it in the code(WITHOUT SPACE).

    • @explorewithlainey3935
      @explorewithlainey3935 11 месяцев назад +1

      ​@@lalitagarwal9155hey,I don't see the 'create app' nor the code you are referring to, after enabling the 2-step verification

    • @lalitagarwal9155
      @lalitagarwal9155 11 месяцев назад

      @@explorewithlainey3935 inside 2 step verification section you will see "App passwords" option just down below of the page.
      Just click and make a new app with your preferred name. After this you will get password that's it.

    • @lalitagarwal9155
      @lalitagarwal9155 11 месяцев назад +1

      @@explorewithlainey3935 it worked or not please specify so that I can help further..

  • @xanos3826
    @xanos3826 2 года назад +7

    Yo, I love the way you explained everything 🎉☄️. This video really helped me 💪

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +3

      Thank you bro, glad to help!✨

    • @ayenidanielibikunle
      @ayenidanielibikunle 2 года назад

      @@AnubhavMadhav
      Hello Mr Anubhav,
      Thank you very much for such an amazing tutorial.
      Please I have a question in the sign view function. How did you call the "user.first_name" in the function when we didn't clearly get the details in the form from the user?

  • @skills_set
    @skills_set Год назад +1

    thanks much, this saved my day

  • @preystation6870
    @preystation6870 Год назад

    single login... 9 thousand files on the project...
    Perfect tutorial, thanks, but Django likes to reinvent the wheel in every app...

  • @shaon935
    @shaon935 2 года назад +2

    Nice tutorial. If you add FORGET PASSWORD option, that will be great

  • @Ahmad_Al-Deeb
    @Ahmad_Al-Deeb 5 месяцев назад +1

    Good job but sadly outdated to work today
    Because Google stopped supporting "Less Secure Apps" feature which prevent me from making my app send Confirmation email.

  • @zachfenton608
    @zachfenton608 2 года назад

    Now, that I have the idea of how to build up a login, I want to add in CSS to it and make it a full website. I really don't care for the email part to be working at the moment, as I need to learn more about the libraries and the code for it is a bit confusing. Thanks a ton.

  • @rickaridi
    @rickaridi Год назад +1

    Thank you for the great video by the way.

  • @anshhmehta
    @anshhmehta Месяц назад

    58:00 Implementation of Token
    1:02:00 implementation of mail link

  • @KeyserTheRedBeard
    @KeyserTheRedBeard 2 года назад +2

    interesting video GeeksforGeeks. I shattered the thumbs up on your video. Maintain up the fantastic work.

  • @user72386
    @user72386 Год назад +1

    Thank you my friend, works very fine

  • @nouhailadkiouak6371
    @nouhailadkiouak6371 Год назад +2

    Well explained! Thank you so much !

  • @abdoTheDS
    @abdoTheDS 10 месяцев назад +1

    this is soooo good

  • @naseempk6401
    @naseempk6401 2 года назад +1

    done this. worked successfully. Thankyou.

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Glad to know! You're welcome.

    • @kohlintr7180
      @kohlintr7180 6 месяцев назад

      I got an error at signup page,pls reply to my msg

  • @shreyash462
    @shreyash462 10 месяцев назад +1

    59:28
    45:30
    18:31
    timestamp to continue

  • @prajwalpgowda7826
    @prajwalpgowda7826 2 года назад +3

    Gmail has removed less secure app access... What to do to complete this task?

  • @sureshchary6814
    @sureshchary6814 2 года назад +2

    Please try to do more Django projects..

  • @sagarb.g.1672
    @sagarb.g.1672 2 месяца назад +1

    Tq so much sir..

  • @shekharkumar3535
    @shekharkumar3535 2 года назад +2

    @GeeksforGeeks Please upload a video on Django Rest API Creation (DRF).

  • @robotectamani
    @robotectamani 2 года назад +1

    Thanks alot Man IM enjoying watching this Great work to Geeks For Geeks

  • @surajitdutta117
    @surajitdutta117 9 месяцев назад +1

    00:00 Learn how to create a login system using Django with email confirmation feature.
    07:24 Create a virtual environment to install Django and set up a basic signup and login functionality.
    15:34 Creating HTML templates and form for authentication app
    24:49 Create a user registration form with Django
    33:13 Creating Sign in functionality
    42:38 Implement confirmation email functionality for the app
    51:02 User registration and email confirmation
    00:00 Creating confirmation email logic for user activation
    1:09:10 Activate user account via confirmation email
    1:17:19 Learn how to create a super user in Django admin panel

  • @adnank7496
    @adnank7496 2 года назад +1

    Very helpful video. Thanks

  • @danielsalmeron4283
    @danielsalmeron4283 2 года назад +3

    Great video, but the "Less secure apps" option no longer exists since May 30th 😓

    • @equalizer1384
      @equalizer1384 2 года назад

      did u find any alternate way!! m facing the same issue.

    • @upendra_1611
      @upendra_1611 2 года назад

      @@equalizer1384 same here dude, did u find any way

    • @jessicam3256
      @jessicam3256 2 года назад

      Same here, any alternative way

  • @saifaliit4579
    @saifaliit4579 6 месяцев назад

    nice i am learining the ecomerce project in may24 for gaining knowledge and for developing website

  • @avelinodahotoyiv1230
    @avelinodahotoyiv1230 2 года назад +2

    Also you created directly templates folder in the root directory. What is the best practice in terms of reusable apps? Creating the static and templates inside the app directory or using your method?

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +1

      For reusability, you ccan go for both ways, but having it in root folder will make your work easier.

    • @ayenidanielibikunle
      @ayenidanielibikunle 2 года назад

      @@AnubhavMadhav Hello Mr Anubhav,
      Please, how did you call the "user.first_name" in the signin view when there isn't a first_name object from the signin form.. It worked in the signup form cus we had a fname defined in the form but it's not working in the signin function.

  • @77N776
    @77N776 2 года назад +1

    Thanks for the great explanation.👍👍👍

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад

      You're welcome and thank you ✨

  • @adityar6511
    @adityar6511 2 года назад +2

    Should have added the timeline into the video, it is really confusing to get to the particular part of the video without it

    • @psp9475
      @psp9475 2 года назад

      exactly!

  • @nikhileshshah361
    @nikhileshshah361 2 года назад +2

    instead of taking last name if I want to take age,city as the input how can I store it into same table

  • @mohitklamba
    @mohitklamba 3 года назад +3

    Great video, really great efforts

  • @haroldquek1655
    @haroldquek1655 Год назад

    would you be making a video tutorial using JWT cookies and incorporating with mongoDB?

  • @varunsu167
    @varunsu167 2 года назад

    Please give me insight as to how i should integrate it with my Machine Learning Model?

  • @radishmouse22
    @radishmouse22 2 года назад +1

    Good video, very helpful and hardly out-of-date

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +1

      Thank you!✨

    • @matchpredictionwithacid9419
      @matchpredictionwithacid9419 2 года назад

      @@AnubhavMadhav code is not running properly giving smtp error

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад

      @@matchpredictionwithacid9419 Check your mail settings again, make sure that you are using your own account and also "turn on access to less secure apps" of that account.

    • @rajibmukherjee3722
      @rajibmukherjee3722 2 года назад

      @@AnubhavMadhav Does Google has this option any more?

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      @@rajibmukherjee3722 I just checked, now it's not available for accounts with 2 Step Verification, in order to use less secure apps with even 2FA accounts, you'll require an application specific password. Search for it and you'll get more details. I hope this helps.

  • @manthanghasadiya
    @manthanghasadiya 3 года назад +2

    Amazing video. Waiting for more videos like this 😀

  • @manaalsandeepparikh2593
    @manaalsandeepparikh2593 3 года назад +2

    Amazing Video and easy to understand!

  • @youssefmkhaouad6186
    @youssefmkhaouad6186 3 года назад +2

    thank you, this was very helpful

  • @timur_kotelnikov
    @timur_kotelnikov 2 года назад +1

    Awesome! Thanks a lot 🔥

  • @hackerMVPP
    @hackerMVPP 3 месяца назад +1

    while running server at 13:11 it gets module error : no module name gfg.settings
    plzz reply

  • @deeptisharma8645
    @deeptisharma8645 Год назад +1

    I am not getting any email after signing up.
    I did all the steps as shown by you.
    Can you help me...

  • @hakeeminfosec
    @hakeeminfosec 2 года назад +2

    those who getting error at "force_text" convert it to "force_str" You will be done....

  • @krupaldudhat3605
    @krupaldudhat3605 2 года назад +1

    After the signup page i am getting redirected to the same page rather than going to the signin page, even after using "return redirect('home')" and every other things things are same as he did..Any solutions please??

  • @kieranstuthridge2932
    @kieranstuthridge2932 Год назад +3

    Hi, my html files are not saved as django files as shown in the video & this doesn't allow me to include the csrf_token. How do i fix this?

  • @aksharbhalani8331
    @aksharbhalani8331 3 года назад +1

    Amazing video bro

  • @himanshuranjansingh6134
    @himanshuranjansingh6134 3 года назад +3

    I'm getting an error.
    Attributerror: 'function' object has no attribute 'filter'
    While registering a new user after implementation of email functionality

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Yeah bro, you should try importing the auth models as mentioned in the video.

  • @engr.nwaohas.o2720
    @engr.nwaohas.o2720 3 года назад +1

    This is great. you really did a nice work

  • @leomaredcampos4941
    @leomaredcampos4941 10 месяцев назад

    This is my question not.
    I already made a web where the client can input data.
    so, is it not part of front end?

  • @hamzaimran973
    @hamzaimran973 2 года назад +2

    Sir the email is not being sent for verification when i signup

  • @akankshaagarwal155
    @akankshaagarwal155 2 года назад +1

    Great content!
    Keep up the good work. 💯

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Thank you so much Akanksha!😊✨

  • @rachanakulkarni6926
    @rachanakulkarni6926 Год назад +1

    Hey I am not able to set less secure apps with G-Account.Cud you expalind how to do it?It shows policy has changed.

  • @Jessy_papa1432
    @Jessy_papa1432 2 года назад +2

    i got integrity error /signup bro . what can I do for this .please rply bro.

  • @rushijaviya7691
    @rushijaviya7691 2 года назад +1

    Very helpful!

  • @AkashGupta-pb1go
    @AkashGupta-pb1go Год назад +1

    Thank you sir

  • @saidysaiidkipkuruikoech1954
    @saidysaiidkipkuruikoech1954 Год назад

    Shikwekwe will always break my ribs😂

  • @KaranArora7
    @KaranArora7 7 месяцев назад

    Whenever I refresh my page after signing in, it shows csrf error. Bit I have already added that csrf code in my html. Please tell me what to do? 45:32

  • @deepshah2305
    @deepshah2305 3 года назад +2

    Amazing 🤩

  • @SajidAli-wy1zs
    @SajidAli-wy1zs 2 года назад +4

    That is my first django project what i am DOING.

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Glad to know!✨

    • @Anxyt
      @Anxyt 2 года назад

      @@AnubhavMadhav non lo chiesi

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад

      @@Anxyt fatti gli affari tuoi

    • @Anxyt
      @Anxyt 2 года назад

      @@AnubhavMadhav ahahahhah

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад

      @@Anxyt 😂

  • @balamurali6698
    @balamurali6698 8 месяцев назад

    Hey, Anubhav I want to know how to create local host and admin page for my own project already written, I can't run my project in local host can u explain for this???

  • @Eng-Mohamed-Ahmed
    @Eng-Mohamed-Ahmed 2 года назад

    thanks bro finally did it

  • @proffkebi6460
    @proffkebi6460 2 года назад +1

    Nice Sir, thank you

  • @anupandey520
    @anupandey520 11 месяцев назад +1

    Everything is cool but Bhaiya I need my money for using my name in your video😁😁😏😂

  • @kiranvijay-iu2uw
    @kiranvijay-iu2uw 4 месяца назад

    hi nice video , however I m beginner and got stuck , i manage to install virtualenv file successfully however next step to creating virtual environment when I put file name after virtualenv kiran , i m getting error "C:\Users\USER\Desktop\Webiste>virtualenv kiran
    'virtualenv' is not recognized as an internal or external command,
    operable program or batch file. ..where i m going wrong and there fore I am not able to command script activation also , can you kindly guide

  • @mohammadaliakbari269
    @mohammadaliakbari269 3 года назад +1

    very helpful.thanks

  • @nayonikaarora5039
    @nayonikaarora5039 2 года назад

    Can you tell why its showing you are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs

  • @rtxgaming2277
    @rtxgaming2277 2 года назад +2

    i am getting an error on this line - return render(request, "authentication/signin.html")
    error - unindent amount does not match previous indent , return can only be used within a function
    Please Reply

    • @njcoder2641
      @njcoder2641 2 года назад

      Indentation error hogi bro

  • @sree0597
    @sree0597 Год назад

    The problem is that Google stopped services for less secure apps so I am unable to generate the email and send

  • @daniellacardenas2920
    @daniellacardenas2920 Год назад

    when i click on sign in or sign up buttons i am not taken to the right page. instead of being taken to the signin page after completing the signup form, i am just taken to a page that reads: "Your file couldn't be accessed," and the file directory is C:/signup. what am i doing wrong?

  • @sahilvishwakarma9188
    @sahilvishwakarma9188 2 года назад +4

    at 18:20 I am getting an error 'TemplateDoesNotExist at /authentication/index.html'
    Can someone please help me with this?

    • @AnubhavMadhav
      @AnubhavMadhav 2 года назад +2

      Try removing the first '/'

    • @SajidAli-wy1zs
      @SajidAli-wy1zs 2 года назад

      I am also getting this error.

    • @aldotheapache6206
      @aldotheapache6206 2 года назад +1

      Check if the templates folder is directly inside "authentication" and not inside the "gfg", "migrations", "__pycache__" or "venv" folders.

  • @taherkatwara3922
    @taherkatwara3922 Год назад

    How about if enter a different email id from this video, does the app will send confirmation email as if you have given your email id in the code?

  • @zachfenton608
    @zachfenton608 2 года назад

    Fabolous Tutorial I got a lot out of it. The email part of the code i had to comment out since it was not letting me access the create user and the admin part. It says something about the token library not being able to be found.

  • @efs1223
    @efs1223 Год назад

    can someone help me? I've tried dozens of migrations and retried the video where it first try if the page is working but all I get is this message "The install worked successfully! Congratulations!
    You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs." and dont see any changes even though I updated it, help

  • @rickaridi
    @rickaridi Год назад

    Can the Django Authentication library be replaced with and external authentication service?

  • @PAPAHAI909
    @PAPAHAI909 11 месяцев назад

    What about wrong credentials during login. If we enter wrong credentials then also user is getting login automatically

  • @developer_4444
    @developer_4444 2 года назад +1

    Excellent

  • @sameerk12982
    @sameerk12982 2 года назад +1

    Thanks!

  • @anishdeuja7832
    @anishdeuja7832 Год назад +1

    what extension should i download and what should i do to write {% for message in messages %} ?

    • @syedammarali108
      @syedammarali108 Год назад

      django v1.10.0
      by Baptiste Darthenay
      Beautiful syntax and scoped snip

  • @editpapa9671
    @editpapa9671 2 года назад +1

    Dhanyawad apka 🙏