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

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

Комментарии • 1,2 тыс.

  • @vladinstein
    @vladinstein Год назад +204

    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 4 года назад +716

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

    • @coreyms
      @coreyms  4 года назад +27

      Thanks!

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад +1

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

    • @sunathkhadikar6287
      @sunathkhadikar6287 4 года назад

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

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад

      @@sunathkhadikar6287 hey man i resolved it...

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад

      @@sunathkhadikar6287 So what exactly the error you are getting

  • @tommyeagen3763
    @tommyeagen3763 4 года назад +133

    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 2 года назад +5

      Did you get job ?

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

      @@ytg6663 yes he did

    • @oktjona
      @oktjona Месяц назад +1

      we are waiting its 2024 have u made the money

  • @broomstick4684
    @broomstick4684 Год назад +44

    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.

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

      Thanks.

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

      thank youu

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

      Thank man, it buggin me out for whole night

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

      goat

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

      Do you have to replace what he said in the video or add that as well as what he said?

  • @shoaibrain4real
    @shoaibrain4real 4 года назад +177

    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  4 года назад +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 Год назад

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

  • @johnprogrammer7164
    @johnprogrammer7164 Год назад +49

    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.

  • @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

  • @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 3 года назад

      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...

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

      @@s-wind2398 brooo

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

      Im rooting for you. Youre the best!

  • @saitaro
    @saitaro 5 лет назад +44

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

  • @_rahiali
    @_rahiali 5 лет назад +36

    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 4 года назад

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

  • @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.

  • @GeorgeEkujereonye-ig3zb
    @GeorgeEkujereonye-ig3zb 7 месяцев назад +2

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

  • @kogorek1
    @kogorek1 5 лет назад +15

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

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад

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

  • @aprilmaycodes
    @aprilmaycodes 3 месяца назад +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 3 месяца назад

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

    • @aprilmaycodes
      @aprilmaycodes 3 месяца назад

      @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

  • @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

  • @calebmbugua745
    @calebmbugua745 5 лет назад +17

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

  • @runescapeswordshow
    @runescapeswordshow 5 лет назад +18

    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 5 лет назад

      yes

    • @jonathanprietoabasolo8985
      @jonathanprietoabasolo8985 5 лет назад +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

  • @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.

  • @anuppaudel
    @anuppaudel 4 года назад +19

    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 4 года назад

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

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

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

    • @sarozpradhan64
      @sarozpradhan64 4 года назад +1

      @@Lavender_animegirl345 me too

    • @Lavender_animegirl345
      @Lavender_animegirl345 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 года назад

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

  • @LocdnessMomster
    @LocdnessMomster 2 года назад +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.

  • @CR4WLFC
    @CR4WLFC 5 лет назад +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.

  • @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!

  • @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 3 года назад

    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.

  • @camilacno
    @camilacno 4 года назад +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  4 года назад +1

      Glad to hear that! Thanks!

  • @felicciasc
    @felicciasc 4 года назад +6

    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.

  • @peterjohn1664
    @peterjohn1664 5 лет назад +14

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

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад

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

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

      @@himanshutiwari4797 Make sure you've imported redirect

  • @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

  • @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!

  • @limari95
    @limari95 5 лет назад +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!

  • @kylecruz6085
    @kylecruz6085 4 года назад +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.

  • @newtonisamoron
    @newtonisamoron 6 лет назад +143

    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 4 года назад

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

    • @dude-ox2em
      @dude-ox2em 4 года назад

      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 4 года назад

      @@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.

  • @m.aminaimeur8846
    @m.aminaimeur8846 5 лет назад +2

    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  5 лет назад

      Thanks! Glad you're finding them helpful!

  • @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?

  • @craiglunney3287
    @craiglunney3287 3 года назад +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

  • @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 3 года назад +1

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

  • @investmentapps7826
    @investmentapps7826 4 года назад +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 4 года назад +1

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

    • @investmentapps7826
      @investmentapps7826 4 года назад +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 4 года назад

      @@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.

  • @michaschmitt8963
    @michaschmitt8963 5 лет назад +7

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

  • @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.

  • @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.

  • @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!

  • @sudonitin
    @sudonitin 4 года назад +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 4 года назад +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

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

    Best Python channel on youtube, period.

  • @emmfueable
    @emmfueable 6 лет назад +10

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

  • @hadesOhades
    @hadesOhades 3 года назад

    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()

  • @benwalsh2825
    @benwalsh2825 6 лет назад +7

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

  • @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.

  • @jonathanvanheijzen365
    @jonathanvanheijzen365 5 лет назад +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.

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

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

  • @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 3 месяца назад

      Can you help me i am still getting stuck at that

    • @furiz1-1
      @furiz1-1 3 месяца назад

      hah thanks, I was getting stuck on it :)

  • @sva3338
    @sva3338 5 лет назад +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.

  • @balance_andbliss
    @balance_andbliss 5 лет назад +3

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

  • @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.

  • @hanha014
    @hanha014 5 лет назад +3

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

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

    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!

  • @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

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

    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

  • @StevenTse
    @StevenTse 5 лет назад +9

    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

  • @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.

  • @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.

  • @mulisainnocent6893
    @mulisainnocent6893 4 года назад +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.

  • @SriVasudevan
    @SriVasudevan 3 года назад

    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 3 года назад +1

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

  • @geolegacy2
    @geolegacy2 4 года назад +3

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

  • @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!

  • @shirinkaul6661
    @shirinkaul6661 4 года назад +40

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

    • @randomuser5780
      @randomuser5780 3 года назад +4

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

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

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

    • @nicoschurrle7465
      @nicoschurrle7465 3 года назад +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

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

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

  • @monagulapa3022
    @monagulapa3022 5 лет назад +3

    The BEST Django tutorial ! Thank you so much. :)

  • @sidrockx95
    @sidrockx95 5 лет назад +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  5 лет назад +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 5 лет назад

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

  • @TalhaKhan-it2ff
    @TalhaKhan-it2ff 4 года назад +3

    You are an effing legend of an Instructor

  • @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

  • @wisdomnagaye5104
    @wisdomnagaye5104 5 лет назад +3

    awesome!! you are a great teacher!!

  • @jorjolandes
    @jorjolandes 5 лет назад +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.

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

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

  • @SheCreatesGames
    @SheCreatesGames 4 года назад +6

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

    • @coreyms
      @coreyms  4 года назад

      Thanks! Glad you found it helpful!

  • @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!

  • @carlitosperez7306
    @carlitosperez7306 5 лет назад +10

    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 3 года назад

      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

  • @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 .

  • @NithinMonni
    @NithinMonni 4 года назад +5

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

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

    Its sad that tinder has a superlike option and this video doesnt have one...Best tutorials hands down..

  • @meta_ai
    @meta_ai 5 лет назад +4

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

  • @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!

  • @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 ()

  • @stevebarter5155
    @stevebarter5155 5 лет назад +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.

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

    I am getting the error in {{form|crispy}} is anyone getting the same?

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

      got from previous comment:
      """
      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.

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

      @@petecastle7657 And if you want to use boostrap5 just replace 4 with 5

  • @haroldpepete
    @haroldpepete 3 года назад

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

  • @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?

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

    For those who having error in 27:31 ,
    I don't do that crispy stuff
    Later I found that , the password which I entered was not valid , so do that first and if not works then only do crispy !!
    Thank you!❤

  • @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 4 года назад +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

  • @iyaephrempaulin2916
    @iyaephrempaulin2916 4 года назад +1

    This dad is gifted! Lot of Thanks!

  • @arpitagupta4474
    @arpitagupta4474 5 лет назад +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

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

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

  • @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

  • @nicachipal1
    @nicachipal1 5 лет назад +2

    You are absolutely the best teacher on this Topic (Django). Wow!, You are amazing. Please make more videos. I would like to know how you can pull data from an external XML and display it on a template page. Thank you !

  • @SaifUlIslam-db1nu
    @SaifUlIslam-db1nu 5 лет назад +3

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

    • @himanshutiwari4797
      @himanshutiwari4797 4 года назад

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

  • @mustaqeemmorshed9821
    @mustaqeemmorshed9821 3 года назад

    Best coding teacher I have ever seen!!

  • @arjupoudel792
    @arjupoudel792 3 года назад +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!

  • @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.

  • @alexwrfrme724
    @alexwrfrme724 6 лет назад +6

    A bit too overwhelming for me.

    • @nimazsheik5152
      @nimazsheik5152 5 лет назад +7

      Take your time with the tutorial, pause it take down some notes. Rewind it if you miss anything and you will understand it. Don't worry we all study at different speeds ;)

  • @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 4 года назад

      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 😊👍

  • @danielalbert4077
    @danielalbert4077 6 лет назад +2

    Thanks dude for the tutorial..Freakin' awesome man.. All description you made to the videos are well understood