Python Django Tutorial: Full-Featured Web App Part 6 - User Registration

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

КОМЕНТАРІ • 1,3 тис.

  • @vladinstein
    @vladinstein Рік тому +280

    If anyone is doing this tutorial and having troubles with crispy forms, with the help of tutorial and some comments, I found that this works:
    1) pip install django_crispy_forms
    2) pip install crispy_bootstrap4
    3) Add both of these to INSTALLED_APPS:
    'crispy_forms',
    'crispy_bootstrap4',
    4) Add both of these at the bottom:
    CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"
    CRISPY_TEMPLATE_PACK = 'bootstrap4'
    5) Use {% load crispy_forms_tags %} and {{ form|crispy }} in the html file.
    As always, great tutorial, thank you, Corey!

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

      Thanks my man!

    • @marimal.l3029
      @marimal.l3029 Рік тому +5

      i used it with bootstrap5 and it works! thank you!!!

    • @vladinstein
      @vladinstein Рік тому +1

      @@padmanabh7031 Glad it helped!

    • @vladinstein
      @vladinstein Рік тому +1

      @@marimal.l3029 You're welcome!

    • @mahamed4744
      @mahamed4744 Рік тому +4

      Thanks bro. Very nice we have a helpful community down in the comment section.

  • @SajadJalilian
    @SajadJalilian 5 років тому +722

    there is huge difference between people who know stuff, with people who can teach stuff.
    you are great teacher

    • @coreyms
      @coreyms  5 років тому +27

      Thanks!

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

      @@himanshutiwari4797 same problem ..did u find a solution??

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

      @@sunathkhadikar6287 hey man i resolved it...

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

      @@sunathkhadikar6287 So what exactly the error you are getting

  • @shoaibrain4real
    @shoaibrain4real 5 років тому +178

    This series is amazing. I wasted 3 days on udemy. didn't learn shit. Thank you Corey !!! I'll contribute to your channel dearly after getting the job.

    • @coreyms
      @coreyms  5 років тому +19

      Thanks! Glad you’re finding it helpful!

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

      @@coreyms Honestly thank you for all the work you put out. A lot of us owe a great deal to you for providing such top quality education material.

    • @mawkuri5496
      @mawkuri5496 3 роки тому +6

      legend say he's still looking for a job as a web developer up until now

    • @manzoorashhab6809
      @manzoorashhab6809 2 роки тому +2

      @shoaib rain did you get the job?

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

      he is busy figting at the frontline for Mr. Putin..

  • @tommyeagen3763
    @tommyeagen3763 4 роки тому +135

    If I make any money from this, I swear to god that I'll support the channel as much as I could What an amazing teacher

    • @coreyms
      @coreyms  4 роки тому +15

      Thanks!

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

      hey, I think that's cool! I guess you inspired me to do the same.

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

      Did you get job ?

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

      @@ytg6663 yes he did

    • @oktjona
      @oktjona 6 місяців тому +1

      we are waiting its 2024 have u made the money

  • @broomstick4684
    @broomstick4684 Рік тому +53

    as of May of 2023, you need to add 'crispy_bootstrap4' to install apps and at the bottom of the settings file you need to add CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4" as well, or else you will run into a template not found error. other than that great tutorials. I love the work.

  • @johnprogrammer7164
    @johnprogrammer7164 Рік тому +53

    I am loving your tutorial and your style of teaching. It's a couple of years gone and myselfe coming across your course is pure bliss.
    For anyone who may get stuck at this lecture and having an issue with {{form|crispy}} kindly in your terminal use this crispy... 'pip install django-crispy-forms==1.14.0'
    The error will be gone. Happy coding, happy learning all.
    All thanks to CoreyMS our legend.

  • @UliaKey
    @UliaKey 4 роки тому +30

    I live in Siberia. I don’t speak English (now I'm using Google Translite). But I understand the python code and I have experience with django. Аnd then I understand you. Thank you for this tutorial series! Without them, my development skills in Django would not have gone off the ground. Finally, I can do what I need for my project!

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

      learnt in our school text book, its the very cold place. in fact its the coldest place on earth if i am not wrong. peace brother.

    • @s-wind2398
      @s-wind2398 3 роки тому +3

      @@RandomScientist She's not a brother...

    • @eda1198-w6m
      @eda1198-w6m 2 роки тому

      @@s-wind2398 brooo

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

      Im rooting for you. Youre the best!

  • @GeorgeEkujereonye-ig3zb
    @GeorgeEkujereonye-ig3zb Рік тому +3

    This is 5yrs later and all I have say is you're the best am glad that I came this way💯👏

  • @AnkitRaj-yc6xy
    @AnkitRaj-yc6xy 4 роки тому +46

    Although I rarely comment on youtube's video. But l have to do it today to tell others that "This is best Django tutorial on youtube".
    Stay safe Stay home.
    Love from India

  • @saitaro
    @saitaro 5 років тому +44

    Jesus these crispy forms are just marvelous! Thank you, master!

  • @alexandertoretto9507
    @alexandertoretto9507 Рік тому +4

    This is pure gold! Thank you Corey for putting all the time and effort into making these tutorials! So happy that I've found your channel!

  • @md.imrulhasan8757
    @md.imrulhasan8757 4 роки тому

    I am sharing one experience.... Once upon a time in 2018 I was curious to learn Django. Then I get started with your videos. then after completed 5/6 videos I have stopped learning Django due to less time for academic pressure.... Then 2nd time I started learning Django in 2019 then I searched you... And found your videos again... and started learning.... and then I again stoped learning Django due to Thesis pressure..... THen for few days ago.... I finally started for the 3rd and final time to learn django... I again found your videos (this playlist)...... This time I will cover all of your videos and will learn django very effectively..... The way you instruct is awesome.... Thats why I always find you when I need it.

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

    These tutorials are so good! I spent a year learning at school and learned even more from your tutorials in one day!

  • @aprilmaycodes
    @aprilmaycodes 8 місяців тому +2

    I've tried a few Django tutorials, and this is by far the clearest and easiest to understand. I'm coming to Django from Flask (which I learned from you as well) and found it really overwhelming at first. These tutorials are a life saver!

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

      How relevant is this course in 20224? I mean is it outdated, considering the the time it was released

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

      @emmanuelcudjoe305 honestly I can't answer that yet. So far I haven't had any issues with it being outdated, but if something does come up I'll keep you posted

  • @anuppaudel
    @anuppaudel 5 років тому +18

    One cannot get tired of watching this series. I have been hooked on since last night, kept me on the whole night.
    Great learning experience without getting bored. Keep posting!!!
    Happy New Year, Corey!!!

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

      Can u please help me with
      Pip install flask-bcrypt
      Its giving me error

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

      You are the first Nepali I found on this channel. Keep growing bro! :)

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

      @@Lavender2884 me too

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

      @@sarozpradhan64 you are in the right track! Corey ko course ekdum effective cha. Currently I'm doing REST Framework from documentation ani I understand every bit. Sayad base ramro vayera hola.

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

      @@Lavender2884 okaybro I am beginner in python .. Learning. . wish u a bright future as well

  • @_rahiali
    @_rahiali 5 років тому +35

    You are an amazing teacher. Thank you so much. so far I feel like I learned two/three semesters of practical development. Continue being awesome.

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

      Can u please help me with
      Pip install flask-bcrypt
      Its giving me error

  • @LocdnessMomster
    @LocdnessMomster 3 роки тому +2

    I'm only on the 6th video in this series and I've started looking at django interview questions and can answer atleast 30 % of every list. All of this from only 6 videos in. You explain a lot and well!! I even believe my bootstrap skills are stronger.

  • @kogorek1
    @kogorek1 5 років тому +13

    Your tutorials are the most informative I've found available in English and Russian languages

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

    Corey you're the greatest.. I'm a slow learner. But I don't have any problems here. Your tutorials are thorough and easy to follow for people who are new to this programming thing.
    Thanks a lot.

  • @camilacno
    @camilacno 5 років тому +4

    These videos are like, a year and a half old. I'm in Brazil. And, man! Still THE best content I found to finish my project. The blog I created before watching this series is being HUGELY updated, and I am positively sure it's gonna be a 10. More than that, every video I get more excited about learning and making things better and better! You are an AMAZING teacher! Thank you so much for sharing all of this with us! I just keep watching the videos one after the other, nonstop! You make learning interesting, exciting and fun!!! Thanks so much!!!

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

      Glad to hear that! Thanks!

  • @congcuongnguyen413
    @congcuongnguyen413 2 роки тому +25

    0:37 - a way for users to login without admin page
    0:58 - a separate app for users
    1:45 - create users app
    2:32 - install users app
    3:31 - create view to handle the logic
    4:31 - auth built-in form
    6:39 - create template
    13:20 - create URL pattern
    16:20 - form.as_p
    17:32 - GET & POST request
    21:13 - flash massage & redirect
    23:47 - update template to show massage
    26:58 - explain the logic behind
    30:45 - save data when they are valid
    32:18 - add email field into form
    35:41 - explain class Meta
    38:53 - form styling with crispy-form

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

    Excellent video! This guy gets both rapid software development and communicating how code works. I also loved that I could follow along with headphones without watching. The co-worker I want and want to be!

  • @calebmbugua745
    @calebmbugua745 6 років тому +17

    Asante sana....From kenya and this is the swahili word for thank you...

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

    I had an issue trying to add new users and doing this exercise I discovered where the problem was coming from, so really thanks. You are really a great teacher.

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

    Thanks you for uploading! I have to learn django to use in my university project. I've been binge watching your tutorials today, they are extremely helpful. Your explanations are super clear and and tell you exactly what you need to know!

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

    ive been smacking my head trying to learn php/sql/javascript, and more complex css. Doing something like this would take me WEEKS! Im so glad i discovered Django/python and YOU! thanks.

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

    This is so incredible. EAch of these lessons takes me twice as long to go through as the video. Once I get a python job I'll patreon.

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

    These are great videos, Corey is an excellent teacher and the pacing is perfect for me.
    Quick tip though, you really need to watch for typos when doing this. I got to 28:00 in this video and my form just would not submit, when I clicked on the button nothing happened. After over an hour of pulling my hair out I spotted this. I had written:
    Sign Up
    Instead of:
    Sign Up

  • @runescapeswordshow
    @runescapeswordshow 6 років тому +19

    For anyone having issues at 27:28 where you get thrown to an error page after the crispy forms part: move the form.save() method to under the if statement. This will save the data to the database once the data has been validated, rather than trying to do it while it's at the POST request

    • @qasim897
      @qasim897 6 років тому

      yes

    • @jonathanprietoabasolo8985
      @jonathanprietoabasolo8985 6 років тому +1

      I did it, and thanks to that i dont have the error but when i create a user, it is not realy saved. Did you resolved it ?

    • @hilda5abigaba770
      @hilda5abigaba770 5 років тому +3

      @@jonathanprietoabasolo8985 what you have to do is to put the form.save() after message.success
      i also had the same issue but i did the above and it worked, try it out and see

  • @michael-jones
    @michael-jones 5 років тому +2

    I just wanted to take time out before I move on to say that you are one of the best educators I have ever come across. Thank you for doing what you do!

  • @peterjohn1664
    @peterjohn1664 5 років тому +14

    Truly bro, this best django tutorials I have ever seen! Thanks a lot.

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

      @@himanshutiwari4797 Make sure you've imported redirect

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

    I havent got a job from watching Corey videos yet, but I've already joined and contribute monthly to support him.
    For anyone here who finds his works outstanding, I dont think you guys have to wait until get a job to support him.
    It's not much from your side, but a greate motivation for him to keep up with this fantastic work. Just my opinion.

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

    That's truely great.
    Every time I tried to learn Django all efforts proved to be in vain
    but
    after I got this, it feels like that, it is too easy... Really a great Job..thanks for your videos.

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

    Once, I open your videos, I just feel laughing, u are the best....finally i can work on my school project with ease

  • @newtonisamoron
    @newtonisamoron 6 років тому +140

    WTF did we do to deserve you?
    @44:20 of this video blew my mind.

    • @o1-preview
      @o1-preview 5 років тому +10

      I am thinking the same thing. I first saw this video, saw your comment and a few others, than went to the first episode and binge watched it until now. I'm thinking about keep going on binge watching activity and stopping at episode 12. This is internet gold.

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

    • @dude-ox2em
      @dude-ox2em 5 років тому

      dude.. i am getting an error:-- TypeError: __init__() missing 1 required positional argument: 'strategy'
      while running the server.. any idea how to solve?

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

      @@dude-ox2em are you running a virtual environment? run "py -m pip install virtualenvwrapper-win" .this will install virtual environment. then run "mkvirtualenv ". then activate it by "workon ". install django again.

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

      @@jasnanajeem9121 hey jess when i added return redirect (i don't remember exactly ) the error was fixed check that out on stack overflow as a reference...
      Hope it ll work for u.

  • @sva3338
    @sva3338 6 років тому +1

    I don't usually comment on other peoples video, but you're an exception. Thank you so much for making these type of videos. It really helped me a lot, you're a great tutor on the internet and never stop what you're doing. Again, thank you.

  • @tanmoysaha4686
    @tanmoysaha4686 Рік тому +6

    In-case anyone is getting error in 42:35 while using the django-crispy-forms with bootstrap4 in the register.html if your getting error install crispy_bootstrap4 by writing pip install crispy_bootstrap4. I was getting this error and solved the issue by this method.

  • @orjiifeanyi1061
    @orjiifeanyi1061 Рік тому +1

    Simply and very easily the best ever TEACHER I ever came across. Thank you so much sir, You are appreciated.

  • @StringOfMusic
    @StringOfMusic 5 років тому +3

    Thanks, this is awesome!!! Been trying several times to use Django and failed miserably, which I had put down to my own limitation, although I can do it now and develop with Django on my own, so now I blame it on all the other 'not so good' tutorials out there.

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

    I learned a lot from this video alone.
    At first, i thought changing to python from java would be a pain.
    You are a great teacher! God bless you brother.

  • @michaschmitt8963
    @michaschmitt8963 5 років тому +7

    Literally the best Django tuts i've seen so far :D keep up the great work!

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

    HI Corey!
    I am a Django beginner and so glad to stumble upon your amazing Django series on youtube. Your way of teaching is amazing!

  • @gk2011
    @gk2011 5 років тому +3

    So I just started working with Django this week(First Framework I have worked with other than just straight python) I am really getting interested in Python Web development thanks in not an insignificant part to these great tutorials. I am really enjoying the simplicity to Django so much that I had fun hunting down where the register.html view got called in the first place because I did not quite understand it. Really enjoying the tutorials!

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

      I am just starting out and did you figured out how the register.html was called if calling the actual html file is in the last section of register function?

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

    6 videos in and I understand everything I'm being shown. Love this. FYI I will be creating an interactive digital signage kiosk for a local hospital with the lessons I've learned here.

  • @sidrockx95
    @sidrockx95 6 років тому +1

    Bucky Roberts used to be my go-to-guy some 3-4 years ago. And now, it's you for sure Corey! Keep up the good work mate!

    • @coreyms
      @coreyms  6 років тому +2

      Thanks! I love Bucky’s videos too. He’s hilarious. Glad to have you on board and that you’re finding the videos helpful!

    • @sundayhonesty5828
      @sundayhonesty5828 6 років тому

      Exactly the same case with me. This man is simply the best

  • @sudonitin
    @sudonitin 5 років тому +4

    I recommend every beginner to refer to this tutorial. Ever since I started following Corey's tutorial I am in ❤ with Django. Thank you so much, Corey.

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

      @@himanshutiwari4797 sure I can help you out

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

      @@sudonitin thank you bro but solved 😊

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

      @@himanshutiwari4797 sorry for late replies. I got the notification just today itself

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

    Whoever gave the solution for the crispy-forms, God bless you dear

  • @emmfueable
    @emmfueable 6 років тому +10

    best video I am actually learning django. Please make more django tutorials thank you

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

    Best Python channel on youtube, period.

  • @jonathanvanheijzen365
    @jonathanvanheijzen365 6 років тому +3

    I'd like to ask the 9 haters who disliked this video why. These videos are great and very helpful.

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

      Let's not forget that we are still on the internet. From 50,000 people watching this video, there will be people who say: "What? 45 minutes? Not gonna watch this." and hit the dislike button. That being said, 9 out of 50,0000 is impressive. And this points out the excellent quality of this tutorials.

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

    Corey, I thought that the best way for me to learn Django was to watch 2 or 3 different tutorial series, so I could get something different from each series and instructor. The only problem was that I couldn't complete a video without a bunch of mistakes and would have to delete the whole program and start from scratch at least 2 times to get it right. I have finished this last video with a few minor mistakes that were very easy to fix and I have a working program! You are the best instructor by far on Yahoo and the only one I intend to watch from now on to learn anything about Python!!! Thank you so much!

  • @benwalsh2825
    @benwalsh2825 6 років тому +7

    Sweet! Thanks for putting these videos up. They are so helpful and clear!

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

    My dude always say "hey there how it is going everybody"
    thank you man this tutorial is very useful

  • @hanha014
    @hanha014 6 років тому +3

    These videos are great, thanks Corey. No bullshit in these just information at a good pace... two thumbs up!

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

    I have not afraid to say, your django sections is the best in entire youtube, great job and thank

  • @anaadrian4767
    @anaadrian4767 6 років тому +7

    Hey Corey, I belive the extra line "email = forms.EmailField()" for the UserRegisterForm is not necessary. Since the UserCreationForm is a model.Form based on the User model, we can call in the Meta class the field named "email".
    Thank you for this awesome tutorial!

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

      The email field is needed because otherwise, crispy doesn't recognize it as required.

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

    For those having trouble with installing crispy-forms in the terminal, I uninstalled it (pip uninstall django-crispy-forms) and re-installed it using the command (pip3 install --user django-crispy-forms) : THE DASH IN FRONT OF USER IS TWO DASHES. This worked for me.

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

      Thanks a bunch. It worked for me

  • @mulisainnocent6893
    @mulisainnocent6893 5 років тому +4

    Brother, thank you so much for the time you take to prepare this tutorial, you really helped me to become a python programmer for the web-based system. I have one request please can you teach this project by using Vue Js and Django. I promise I gonna buy you a coffee. I will thank you in advance if you take the time to answer my post. Again thank you a lot.

  • @m.aminaimeur8846
    @m.aminaimeur8846 6 років тому +1

    Best tutorials ever!! I followed 6 videos step by step till now, kept me up the whole night and didn't get bored for a sec, you're doing a great job dude. thank you and wish you all the best...

    • @coreyms
      @coreyms  6 років тому

      Thanks! Glad you're finding them helpful!

  • @balance_andbliss
    @balance_andbliss 6 років тому +2

    Your tutorials are so easy to follow and you make coding really fun. Keep it up sir. ☺☺

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

    Just wanna say thanks for this great tutorial, I'm making a whole different project by watching your series. God bless you .

  • @eamonburns9597
    @eamonburns9597 Рік тому +5

    For anyone having trouble with not being redirected after submitting the form (27:28). The form must be "valid", this includes meeting password complexity requirements.
    Edit: I just realized that it actually says so on the form 🤦‍♂

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

      Can you help me i am still getting stuck at that

    • @hunter-c3r
      @hunter-c3r 7 місяців тому

      hah thanks, I was getting stuck on it :)

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

      please i'm still stuck here. its saying page not found register/post

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

    The whole registration/authentication etc. was so confusing in my book I have. Here it motivated me, cause I just understood it. Very cool!

  • @geolegacy2
    @geolegacy2 5 років тому +3

    GOD BLESS YOU!!! You have no idea what you have done to us!

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

    The detailed way that you explain each step - e.g. why we use bootstrap4 instead of defaulting to bootstrap2 - helped me a lot to debug my code. Thank you, Corey!

  • @edris7665
    @edris7665 5 років тому +3

    At 15:07 some people might get an import error, where the module users is not recognized. To fix it make sure your main folder is selected as source folder. Right click on the folder and go to "Mark directory as" and select root directory. That fixed the issue for me!

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

      That just a Pycharm issue.

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

      Bro you are legend

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

      @@vighnesh153 yes true

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

    Your videos have helped me a lot! Thanks !
    In case anyone face this error:
    After the changes you made in Full-Featured Web App Part 7 - Login and Logout System
    in users/views.py line number 14 "redirect(login)".
    while registering a new user, the register page will not redirect to the login page, instead it will give an error :
    save() got an unexpected keyword argument 'force_insert'
    but the user will be added to the database.
    In users/models.py
    use
    def save(self, **kwargs):
    super().save()
    instead of
    def save(self):
    super().save()

  • @shirinkaul6661
    @shirinkaul6661 4 роки тому +40

    Was debugging my form code for 1 hour and then realized I had misspelled 'form'. XD

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

      lol I wasted a lot time finding error finally found that I wrote 'cripsy_forms' XD

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

      lol i missed one space it took me 3 hours to find. Half of coding is debugging

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

      Thanks for your comment, exactly same mistake but got it faster because of you B-)

    • @s-wind2398
      @s-wind2398 3 роки тому +2

      I had misspelled 'cleaned_data' with 'cleaned_date'...Jesus! Took me years to find out :D

    • @Ko-wk1lp
      @Ko-wk1lp 3 роки тому

      same my code wasn't working and I found out that I typed 'crispy-forms' instead of 'crispy_forms' in installed apps. XD

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

    Best coding teacher I have ever seen!!

  • @wisdomnagaye5104
    @wisdomnagaye5104 5 років тому +3

    awesome!! you are a great teacher!!

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

    Hey you are truly a great teacher... These videos are truly gems of learning for me! Kudos to you!

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

    You're amazing💜 I've learend so many things from these series❤Thank you.please make more videos about django😭

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

      Thanks! Glad you found it helpful!

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

    Love your tutorials, Corey! Wish you would make more of them... 😥 Best Python content, hands down. 👌

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

    thankyou, one suggestion: simply put blog, users is okay on settings.py, no need explicitly put blog.apps.BlogConfig

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

      It might be the case that at the time of this tutorial you couldn't do this

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

      @@Inforetriever No... Even videos uploaded way before this have done by only specifying the app name

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

    not only the best django tutorial this series are the best I have covered in my entire life thanks a lot Coreythemaster

  • @NithinMonni
    @NithinMonni 4 роки тому +5

    My heart rate went dangerously high because nothing was working...
    *And then I remembered the commas.*

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

    Great video series! I find it very interesting how the views and likes are going down video by video. This shows that most people have no stamina. All viewers can be proud if they make it to the end and I hope your projects will work out in the future.

  • @TalhaKhan-it2ff
    @TalhaKhan-it2ff 4 роки тому +3

    You are an effing legend of an Instructor

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

    I loved how crispy did its magic by styling the register page frong-end

  • @meta_ai
    @meta_ai 5 років тому +4

    Thank you sooooooooooooooooooooooooooooooooooooooooooooooo much ,,,,,,you are awesome

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

    Nicely done. Two minor feed backs: 1. Type slowly so that student can keep up typing without pausing the video. 2. Don't refresh the screen rapidly so student does not have to go back in video to see what you typed! All in all, you are one of the best teachers. BTW I have taught as a teacher and professor and you are a better teacher than me! Thanks a million

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

      pause button to rescue. if he slows done , videos would be 2 hr long

  • @jorjolandes
    @jorjolandes 6 років тому +10

    How does our base.html knows about the variable “messages”? If we are not giving it as a parameter on any view?

    • @xekis
      @xekis 5 років тому +3

      "messages" was imported into users/views.py. Since the template tag is a conditional based on the existence of "messages" any view that doesn't define it will simply ignore the rest of the code block to process and render "messages".

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

      Go to settings.py and you'll find 'django.contrib.messages.middleware.MessageMiddleware' that is doing the magic.

  • @stevebarter5155
    @stevebarter5155 6 років тому +1

    I really thought I could get this through whole series in one day... been writing each step down by hand and following along on pc.. been like 8 hours atleast and im only at chapter 7. ugh lol. Tomorrow I will finish!

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

      You probably had to watch every video over and over because this isn't a series you can binge-watch and expect to get everything in the end.

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

    [27:30 ERROR] I had to append my 'register/' path to 'path('register/index.html', user_views.register, name='register'),'
    I kept receiving the following error w/o the modification above,
    "Using the URLconf defined in django_project.urls, Django tried these URL patterns, in this order:
    admin/
    register/ [name='register']
    [name='blog-home']
    about/ [name='blog-about']
    The current path, register/index.html, didn't match any of these."
    I made the change and everything works fine. Don't know where the index.html came from as I don't have an index.html file anywhere, but clicking the submit button on the form produced this route. Now instead of going to localhost:8000/register , I have to go to localhost:8000/register/index.html and everything is as expected
    EDIT: Rookie mistake, atom auto set my form action="index.html"

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

      I get a similar error message, but my one says: **The current path, register/POST, didn't match any of these.**

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

      Any idea what i should do?

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

      It just needs a comma at the end. path('register/', user_views.register, name='register'),

    • @riadshalahinleon349
      @riadshalahinleon349 Рік тому +1

      @@javaguitarist You should use () to get the brower to use a POST request for the form.
      not this ()

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

    I never found this type of amazing video to learn something. Thank you very much, Corey Schafer. You are great. You deserve more subscribers than currently have. I believe you will get more subscribers very soon.

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu 5 років тому +3

    A bit hard to get at first, but spectacular nonetheless. Thank you. :P

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

    I'll be supporting this channel as soon as i get my first paycheck.

  • @carlitosperez7306
    @carlitosperez7306 5 років тому +9

    In case anyone else is having an issue when creating a new user in my case i realized that in register.html in the form tag instead of method="POST" i had action="POST" which is added by sublime automatically after writing form and pressing tab. Maybe someone is having the same silly error

    • @vbroskas
      @vbroskas 5 років тому +4

      Thanks bro, your comment saved me, I was looking everywhere for why I kept getting redirected to register/index.html. It was that my IDE default set action="index.html"

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

      I had the same issue. And couldn't figure out WTF happened. And then I saw this comment. F awesome. Thanks a million bro!!

    • @PedroMiguel-iw5ul
      @PedroMiguel-iw5ul 4 роки тому

      Ahahah my error had nothing to do with the IDE, I simply wrote mehtod instead of method, been searching for hours what was wrong! Thanks man ahah

  • @jazzelradaza343
    @jazzelradaza343 5 років тому +2

    THIS IS BY FAR THE BEST DJANGO TUTORIAL I'VER EVER SEEN!!! Dude you are so amazing!!! You deserve more stats than this. I've shared your channel to all my friends!

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

      Thanks!

    • @AashishKumar-op2dm
      @AashishKumar-op2dm 5 років тому +2

      Reply only to girl 😂😂

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

      Hey can you help me out...
      Whenever i click on signup then it doesn't redirects me to blog page...

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

      @@mounika_bathina hey sorry for late reply u might hv solved it but still
      In the place to return request use return redirect that ll take to next page

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

      @@mounika_bathina 😊👍

  • @arpitagupta4474
    @arpitagupta4474 6 років тому +3

    At 15:30 my command line gives a ModuleNotFoundError, how to resolve it?

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

      Check to make sure you added a comma after: 'users.apps.UsersConfig', that was my problem is I was missing the comma.

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

      Dear @Arpita Gupta, THATS İS RİDİCOLUSLY WORKED. I AM STUPİD. Spent 2 hours

  • @adoy8652
    @adoy8652 2 роки тому +3

    for ppl trying to use bootstrap5, you need to add 'crispy_bootstrap5' to installed apps too, and also add CRISPY_ALLOWED_TEMPLATE_PACKS = 'bootstrap5' in the main project's settings.py file

    • @Good-and-Geeky
      @Good-and-Geeky Рік тому

      I tried a load of things to get Crispy working with no luck - So I gave up on it and found another way to style the form.

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

    Just want to say that, Best Django tutorial ever seen.😍

  • @jn5912
    @jn5912 5 років тому +7

    For those not getting the flash message "Account created for NewUser" maybe check your spelling, for me I was spelled message as messsage XD. Thank you Corey.

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

      I read your comment at the start of the video and thought
      "What kind of idiot would do that?"
      I did that in my base.html file
      Troubleshooting tip though: If you don't get your flash message until you open your admin page, then you made an error in base.html or user/views.py

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

    just wanna say thank you for your tutorials. you explain things really well and help me see clearly how everything links together and im so happy i found this channel and ill be making a donation

  • @peternavarroiii3944
    @peternavarroiii3944 5 років тому +3

    I'm stuck at 27:15 for some reason. I keep on getting this error when trying to load the register page: ValueError at /register/
    The view users.views.register didn't return an HttpResponse object. It returned None instead.
    The error doesn't occur before adding all the conditionals in the register function.
    It works just fine with:
    ------------------------------------------------------------------------------------------------------------------------
    from django.shortcuts import render, redirect
    from django.contrib.auth.forms import UserCreationForm
    from django.contrib import messages
    def register(request):
    form = UserCreationForm()
    return render(request, 'users/register.html', {'form': form})
    ------------------------------------------------------------------------------------------------------------------------
    Is anybody experiencing this as well? I've been stuck for hours.
    Thanks in advance,
    Peter

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

      I'm getting same error

    • @peternavarroiii3944
      @peternavarroiii3944 5 років тому +2

      @@mayurbagul1276 Looks like I had the else statement indented. I redid the register function and realized this. Weird how the server didn't flag this before when restarting it. Hope this helps.
      def register(request):
      if request.method == 'POST':
      form = UserCreationForm(request.POST)
      if form.is_valid():
      form.save()
      username = form.cleaned_data.get('username')
      messages.success(request, f'Account created for {username}!')
      return redirect('blog-home')
      else:
      (This needed to be indented back)
      form = UserCreationForm()
      return render(request, 'users/register.html', {'form': form})

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

      @@peternavarroiii3944 yeah it was minor mistake from my side too. After fixing that mistake it was working.

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

      I had same issue. I erased the register function -save the file-, redid, and restarted the server and realized it. It is worth highlighting that I spent some hours trying to solve it.

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

      Hi, please check if you are importing redirect shortcut in first line
      from django.shortcuts import render, redirect
      Hope that helps

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

    Thank you so much for this series.. This is the best series on youtube to learn Django for free. Will reccommend to all my friends. Thank you again!

  • @arjupoudel792
    @arjupoudel792 4 роки тому +3

    Teachers are not because they know what they do but they know how to teach others. You are the later one, we all know that!

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

    Corey you're awesome , thank you for your great tutorials , I watched like 3 or 4 series of Django tutorials and still I'm learning so much more from your series , thanks a lot , there's almost no way that I can support you because of country I'm live in , but I'm gonna like and comment on all of your videos, wish you the best.

  • @craigdanielmaceacher
    @craigdanielmaceacher 6 років тому +12

    Why put “users.apps.UserConfig”? You can just put “users” there instead and it works. Is there a reason to doing it this more confusing way?

    • @kobas8361
      @kobas8361 6 років тому +25

      Corey had already explained it in details in one of the previous episodoes. "UserConfig" class is the only thing you need there, so there's no reason to import the whole app (which in fact includes that particular class, but a whole bunch of unnecessery code as well, which, I pressume, would slow the whole website down a bit).

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

      u found the answer yet?

  • @investmentapps7826
    @investmentapps7826 5 років тому +2

    Thank you very much for this awesome Django tutorial, I am sure everyone knows how to do this however since I added some extra fields in the forms.py file, I thought it would be nice to share it just in case someone else was interested.
    'forms.py'
    class UserRegisterForm(UserCreationForm):
    email = forms.EmailField(required=True)
    first_name = forms.CharField(required=False)
    last_name = forms.CharField(required=False)

    class Meta:
    model = User
    fields = ['first_name', 'last_name','username', 'email', 'password1', 'password2' ]

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

      sir can we add more extra fields like
      age
      city
      address?

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

      @@tripathi5174 Yes you can extend the data model as per your requirements. I am not the best person to teach this however I believe some of the previous lessons covered this topic.

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

      @@investmentapps7826 thankyou sir
      i tried but in the admin section i am not able to see the registered users email and last name
      however i am able to register it easily.

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

      If u put (required = True),which is by default, in first_name and last_name and add and user, first_name and last_name are not visible in admin page. why is it so? I cannot see my extra variables in admin page.