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!
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.
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.
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!
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
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.
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 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
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!!!
@@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.
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.
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.
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!!!
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
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!
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.
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!
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.
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
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
@@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
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!
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.
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.
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.
dude.. i am getting an error:-- TypeError: __init__() missing 1 required positional argument: 'strategy' while running the server.. any idea how to solve?
@@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.
@@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.
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.
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.
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.
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.
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!
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?
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.
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.
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!
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!
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.
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.
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...
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 🤦♂
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!
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!
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()
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.
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
"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".
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!
[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"
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.
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
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"
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!
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
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.
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
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
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 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})
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.
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.
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).
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 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.
@@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.
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.
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!
Thanks my man!
i used it with bootstrap5 and it works! thank you!!!
@@padmanabh7031 Glad it helped!
@@marimal.l3029 You're welcome!
Thanks bro. Very nice we have a helpful community down in the comment section.
there is huge difference between people who know stuff, with people who can teach stuff.
you are great teacher
Thanks!
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
@@himanshutiwari4797 same problem ..did u find a solution??
@@sunathkhadikar6287 hey man i resolved it...
@@sunathkhadikar6287 So what exactly the error you are getting
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.
Thanks! Glad you’re finding it helpful!
@@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.
legend say he's still looking for a job as a web developer up until now
@shoaib rain did you get the job?
he is busy figting at the frontline for Mr. Putin..
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
Thanks!
hey, I think that's cool! I guess you inspired me to do the same.
Did you get job ?
@@ytg6663 yes he did
we are waiting its 2024 have u made the money
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.
Thanks.
thank youu
Thank man, it buggin me out for whole night
goat
Do you have to replace what he said in the video or add that as well as what he said?
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.
Thank you sir 👌
you da man
you saved the day!!
THX SO MUCH!!!
Thanks!
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!
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.
@@RandomScientist She's not a brother...
@@s-wind2398 brooo
Im rooting for you. Youre the best!
This is 5yrs later and all I have say is you're the best am glad that I came this way💯👏
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
Great
I agree Corey tutorials are amazing
Jesus these crispy forms are just marvelous! Thank you, master!
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!
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.
These tutorials are so good! I spent a year learning at school and learned even more from your tutorials in one day!
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!
How relevant is this course in 20224? I mean is it outdated, considering the the time it was released
@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
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!!!
Can u please help me with
Pip install flask-bcrypt
Its giving me error
You are the first Nepali I found on this channel. Keep growing bro! :)
@@Lavender2884 me too
@@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.
@@Lavender2884 okaybro I am beginner in python .. Learning. . wish u a bright future as well
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.
Can u please help me with
Pip install flask-bcrypt
Its giving me error
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.
Your tutorials are the most informative I've found available in English and Russian languages
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
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.
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!!!
Glad to hear that! Thanks!
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
Big ups
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!
Asante sana....From kenya and this is the swahili word for thank you...
😂😂😂 sawa
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.
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!
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.
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.
Thanks!
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
Sign up the same issue)
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
yes
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 ?
@@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
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!
Truly bro, this best django tutorials I have ever seen! Thanks a lot.
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
@@himanshutiwari4797 Make sure you've imported redirect
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.
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.
Once, I open your videos, I just feel laughing, u are the best....finally i can work on my school project with ease
WTF did we do to deserve you?
@44:20 of this video blew my mind.
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.
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
dude.. i am getting an error:-- TypeError: __init__() missing 1 required positional argument: 'strategy'
while running the server.. any idea how to solve?
@@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.
@@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.
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.
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.
Simply and very easily the best ever TEACHER I ever came across. Thank you so much sir, You are appreciated.
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.
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.
Literally the best Django tuts i've seen so far :D keep up the great work!
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!
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!
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?
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.
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!
Thanks! I love Bucky’s videos too. He’s hilarious. Glad to have you on board and that you’re finding the videos helpful!
Exactly the same case with me. This man is simply the best
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.
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
@@himanshutiwari4797 sure I can help you out
@@sudonitin thank you bro but solved 😊
@@himanshutiwari4797 sorry for late replies. I got the notification just today itself
Whoever gave the solution for the crispy-forms, God bless you dear
best video I am actually learning django. Please make more django tutorials thank you
Best Python channel on youtube, period.
I'd like to ask the 9 haters who disliked this video why. These videos are great and very helpful.
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.
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!
Sweet! Thanks for putting these videos up. They are so helpful and clear!
My dude always say "hey there how it is going everybody"
thank you man this tutorial is very useful
These videos are great, thanks Corey. No bullshit in these just information at a good pace... two thumbs up!
I have not afraid to say, your django sections is the best in entire youtube, great job and thank
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!
The email field is needed because otherwise, crispy doesn't recognize it as required.
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.
Thanks a bunch. It worked for me
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.
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...
Thanks! Glad you're finding them helpful!
Your tutorials are so easy to follow and you make coding really fun. Keep it up sir. ☺☺
Thanks!
Just wanna say thanks for this great tutorial, I'm making a whole different project by watching your series. God bless you .
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 🤦♂
Can you help me i am still getting stuck at that
hah thanks, I was getting stuck on it :)
please i'm still stuck here. its saying page not found register/post
The whole registration/authentication etc. was so confusing in my book I have. Here it motivated me, cause I just understood it. Very cool!
GOD BLESS YOU!!! You have no idea what you have done to us!
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!
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!
That just a Pycharm issue.
Bro you are legend
@@vighnesh153 yes true
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()
Was debugging my form code for 1 hour and then realized I had misspelled 'form'. XD
lol I wasted a lot time finding error finally found that I wrote 'cripsy_forms' XD
lol i missed one space it took me 3 hours to find. Half of coding is debugging
Thanks for your comment, exactly same mistake but got it faster because of you B-)
I had misspelled 'cleaned_data' with 'cleaned_date'...Jesus! Took me years to find out :D
same my code wasn't working and I found out that I typed 'crispy-forms' instead of 'crispy_forms' in installed apps. XD
Best coding teacher I have ever seen!!
awesome!! you are a great teacher!!
Hey you are truly a great teacher... These videos are truly gems of learning for me! Kudos to you!
You're amazing💜 I've learend so many things from these series❤Thank you.please make more videos about django😭
Thanks! Glad you found it helpful!
Love your tutorials, Corey! Wish you would make more of them... 😥 Best Python content, hands down. 👌
thankyou, one suggestion: simply put blog, users is okay on settings.py, no need explicitly put blog.apps.BlogConfig
It might be the case that at the time of this tutorial you couldn't do this
@@Inforetriever No... Even videos uploaded way before this have done by only specifying the app name
not only the best django tutorial this series are the best I have covered in my entire life thanks a lot Coreythemaster
My heart rate went dangerously high because nothing was working...
*And then I remembered the commas.*
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.
You are an effing legend of an Instructor
I loved how crispy did its magic by styling the register page frong-end
Thank you sooooooooooooooooooooooooooooooooooooooooooooooo much ,,,,,,you are awesome
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
pause button to rescue. if he slows done , videos would be 2 hr long
How does our base.html knows about the variable “messages”? If we are not giving it as a parameter on any view?
"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".
Go to settings.py and you'll find 'django.contrib.messages.middleware.MessageMiddleware' that is doing the magic.
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!
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.
[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"
I get a similar error message, but my one says: **The current path, register/POST, didn't match any of these.**
Any idea what i should do?
It just needs a comma at the end. path('register/', user_views.register, name='register'),
@@javaguitarist You should use () to get the brower to use a POST request for the form.
not this ()
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.
A bit hard to get at first, but spectacular nonetheless. Thank you. :P
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
I'll be supporting this channel as soon as i get my first paycheck.
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
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"
I had the same issue. And couldn't figure out WTF happened. And then I saw this comment. F awesome. Thanks a million bro!!
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
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!
Thanks!
Reply only to girl 😂😂
Hey can you help me out...
Whenever i click on signup then it doesn't redirects me to blog page...
@@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
@@mounika_bathina 😊👍
At 15:30 my command line gives a ModuleNotFoundError, how to resolve it?
Check to make sure you added a comma after: 'users.apps.UsersConfig', that was my problem is I was missing the comma.
Dear @Arpita Gupta, THATS İS RİDİCOLUSLY WORKED. I AM STUPİD. Spent 2 hours
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
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.
Just want to say that, Best Django tutorial ever seen.😍
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.
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
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
Thanks!
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
I'm getting same error
@@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})
@@peternavarroiii3944 yeah it was minor mistake from my side too. After fixing that mistake it was working.
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.
Hi, please check if you are importing redirect shortcut in first line
from django.shortcuts import render, redirect
Hope that helps
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!
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!
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.
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?
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).
u found the answer yet?
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' ]
sir can we add more extra fields like
age
city
address?
@@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.
@@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.
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.