If you're using Django 5 or higher you will encounter the problem with accessing the 'logout' page directly from the browser like Corey does. This is because the logout endpoint can be accessed now only using a 'POST' method, and accessing it via a URL is using the 'GET' method. One of the ways you can resolve this issue is to add this short code snippet instead of the standard link element in the navbar: {% csrf_token %} Logout Doesn't look perfect but it works :) Hope this helps!
@GanaderIA-qv6fh9 ай бұрын
I was just running into this issue yesterday! Thanks!! Would like to see a way we can keep the anchor instead of having to use a btn though.
@tarik_el_oukili8 ай бұрын
Thanks man
@SachiSisodia-lc6zj7 ай бұрын
tysm!
@Incognito-rr5ic6 ай бұрын
Thanks man.
@perezjoshua25416 ай бұрын
Thanks a lot
@rishabhkumar56116 жыл бұрын
I love it how he says - " We'll fix that in just a second " and actually fixes it quite well in a second :)
@python46923 жыл бұрын
He knows what he's doing!
@solomonjayceon12843 жыл бұрын
i guess im asking the wrong place but does anybody know a way to log back into an instagram account..? I stupidly lost the login password. I appreciate any help you can offer me
@maximomohamed29093 жыл бұрын
@Solomon Jayceon instablaster =)
@solomonjayceon12843 жыл бұрын
@Maximo Mohamed I really appreciate your reply. I got to the site through google and im in the hacking process now. Looks like it's gonna take quite some time so I will get back to you later with my results.
@solomonjayceon12843 жыл бұрын
@Maximo Mohamed It did the trick and I now got access to my account again. I'm so happy:D Thanks so much, you really help me out !
@Canda-fh4xc6 жыл бұрын
This is my second tutorial series with you. I already finished Python Flask Tutorial. I watched multiple Django tutorials. Free (blogs and KZbin) AND Paid(Udemy, edx,..). Your way of teaching is completely different. You are real instructor. You made Django/python really simple to anyone who wants to learn the language. I will make sure to share your KZbin Tutorial Channel with everyone I know/meet Thank you so much,
@coreyms6 жыл бұрын
Thanks!
@raskotimagar.2110 ай бұрын
while trying logout im getting, This page isn’t workingIf the problem continues, contact the site owner. HTTP ERROR 405 error. what should i do?!
@Canda-fh4xc10 ай бұрын
@@raskotimagar.21 "Method Not Allowed" error. Check the URL Routing
This method is obsolete, google "405 logout" @@raskotimagar.21
@sarthakbhutani74134 жыл бұрын
I really love that : "we haven't created this yet but we will in just a second"! God bless you sir.
@waleedabdulmanea53014 жыл бұрын
I like when he says, 'we are gonna fix this in a second', the instructor is reading our minds, good job, and keep the great work, i am one of your students :)
@sharathkrishnan15584 жыл бұрын
Not only are these tutorials the best.. But the way you explain, it motivates me to carry on further and it really creates interest in the subject
@congcuongnguyen4132 жыл бұрын
0:31 built-in login/logout page for user 1:02 import auth_views & create path 2:53 create templates for those views 8:37 setting login_redirect_url 11:28 redirect to login page after register 12:32 create template for logout page 16:37 change navigation bar base on login/logout 18:20 built-in user variable contain current user 20:55 restriction on certain route if not login 21:47 create profile view & template & URL 25:57 login_required decorator 27:50 setting login_url 28:43 ?next=...
@raskotimagar.2110 ай бұрын
while trying logout im getting, This page isn’t workingIf the problem continues, contact the site owner. HTTP ERROR 405 error. can you help me please
@minsuga29889 ай бұрын
Did the error get solved can u tell me how
@mychal.b9 ай бұрын
@@raskotimagar.21 im having the same error. in the command line it says Method Not Allowed (GET): /logout/ but i dont know how to fix it
@mychal.b9 ай бұрын
@@raskotimagar.21 {% csrf_token %} logout try this
@thiagokkawakita9 ай бұрын
This method is obsolete, google "405 logout"@@mychal.b
@erwinnovo3014Ай бұрын
These video tutorials are just truly amazing! Thanks and kudos Corey!
@aminuolawale18434 жыл бұрын
Your Flask Series helped me land my current Python job! You are a great teacher !
@toastrecon5 жыл бұрын
Amazing how much functionality is available right out of the box. Thanks, Corey!
@justinlee34533 жыл бұрын
Thanks corey, I've gone over this for the third time, and now this totally makes sense
@jamesskipworth51424 жыл бұрын
Suggestion for anyone recreating to add 'redirect_authenticated_user=True' at 4:50 so already logged in users are redirected through the login page. Loved the series though Corey really helped with my school project.
@lightninginmyhands48785 жыл бұрын
27:50 `LOGIN_URL` is used to override Django's default URL when a user is trying to access a `login_required` site. We have created our own login route thus `LOGIN_URL` will be assigned to that.
@shikunchen85234 жыл бұрын
how can we fix it when login the page always redirects to the home page instead of profile page?
@imawo10 ай бұрын
i'm encountring the same problem . did yo get where's the problem?@@shikunchen8523
@commonsense1019 Жыл бұрын
his clearity about the concepts is visible through his advance yet easy to understand explaination
@sebastianb20924 жыл бұрын
Like I'm watching these videos for 3 days now every day after work and continuingly learning about Python and the Django framework. Love it @Corey Schafer
@romnegrillo3 жыл бұрын
You can still view the login page even though you're logged in. You can change your login route as: path("login/", auth_views.LoginView.as_view(template_name = "users/login.html", redirect_authenticated_user=True), name="login"), so it will be reditected to blog-home route when you try to access the login page even though you;re authenticated. I'm loving this series. Your tutorial is really good. You explain complex problems into simple terms.
@demaxl732 Жыл бұрын
Thanks
@jayedm33425 жыл бұрын
i dont know why the channels sharing knowledge have only 100k+ subs while nonsense channels have milliions ... GUYS lets hit that subs red btn and make it to million+
@grouchydrago13964 жыл бұрын
Trust me I have
@MagnusAnand5 жыл бұрын
This tutorial is becoming better in every video
@pranjalrai-f7g9 ай бұрын
I love it how you taught any topic in such a easy way In my project on opening logout page it was showing 405 error and page breakdown. I have tried various thing but it was not helping so help me in this.
@tigger25814 жыл бұрын
hands down best tutorials on youtube. and ive watched many
@vp90416 жыл бұрын
Annoyed in the past about not having that next function, truly a nice feature, well explained nice video
@doniyorabduvokhidov18624 жыл бұрын
The best Django tutorial I've ever seen .. thank you for all of your effort .. really appreciate
@roshanpandey53575 жыл бұрын
Well, this video is awesome as others of the same series. Just loved it :-)
@geolegacy25 жыл бұрын
7 videos in and so far still so good! God bless
@tahhaa9063 жыл бұрын
I Really like when he says : " that django provides for us ".
@olhamarushchak35146 жыл бұрын
Love you so much!! Thank you for this Django course, I've been waiting for so long!
@ABASSANIMERIKUKU3 ай бұрын
You are just the best.....Django is just sinking into my head
@Klutche3 жыл бұрын
I can't wait to bring my idea to life with your guidance! Thanks Corey for all you've done! I will follow up once i've deployed my first app!
@ASADULLAHGALIB255 жыл бұрын
Corey Schafer, you are the best teacher 👌
@suryamanipandey80023 жыл бұрын
this series is so amazing that its hard to put in words. Thank you for teaching so much in so less time.
@banaras.wala.foreignaala4 жыл бұрын
Hi Corey, So far so good, I want to say thanks for your efforts.
@andrewchen77106 жыл бұрын
Thank you so much Corey! Really helps my startup on building on page! Whether we succeed or not we owe a huge one to you!
@coreyms6 жыл бұрын
Good luck! What kind of startup?
@NphiniT6 жыл бұрын
@@coreyms I am gonna use this for my startapp too. It is basically an online bus ticket booking system for travelling within Ghana. I plan on creating Android and iOS Apps for it as well. Any advice and Pointers??
@ALEXEIS5 жыл бұрын
@@NphiniT You need a partner?
@NphiniT5 жыл бұрын
@@ALEXEIS How good is your front-end development? E-mail me: nurudeen.karim2016@gmail.com
@godfreynolottyogwu85625 жыл бұрын
@@NphiniT great idea
@harwinderthakur97084 жыл бұрын
I was surprised to see how well crispy forms work with django . It's like a magic don't have to do anything.
@shreyas00025 жыл бұрын
Basically Corey Is A Magician, Guy Knows What problem will arise due to every Small Changes in code and even fixes it!
@akshaykaushik94 жыл бұрын
love you bro.Watched every video available on your channel. Everything learned from you. Feels like i know python as intermediate although it is hard to keep remember every topic.
@godeytech2 жыл бұрын
I really love this. Easy to understand and easy to practice on your own
@GDLAPROD2 жыл бұрын
Wow! Impressive. Everything is still relevant.
@liviumircea69055 жыл бұрын
amazing ...one of the best tutorials on django
@xdlandxd57734 ай бұрын
if someones nav bar doesnt refresh on login or logout, mayby its bcs of ..LoginView... in logout path: path('logout/', auth_views.LoginView.as_view(template_name='users/logout.html'), name='logout'), in urls.py file most funny thing on this problem is no one else have this problem... took me a while to fix like anyone else, great tutorial, thank you, Corey!
@anandkumar-wf1soАй бұрын
hey can u tell me the fix for this?
@vegadevelopers9 ай бұрын
Thank you so much with details explanations and teaching. 👌👌👌 Quality Tutorial!
@slan75 жыл бұрын
God-tier tutorials. Thank you, sir.
@shadow_was_here4 жыл бұрын
The Best django tutorial.. Love your teachings man. Great work.
@olaniyiajayi801211 ай бұрын
If you have error 405 page on logout page it may be due to latest django version this is what I did to get round it. In users views folder i put this code from django.contrib.auth import logout def logout_view(request): logout(request) return render(request, 'users/logout.html') then in main project urls I put this in urr parttern list path("logout/", user_views.logout_view, name="logout"), You can comment out the former url path of logout
@jaedenhero54811 ай бұрын
Works. Thank you very much!
@maxchapin5210 ай бұрын
This worked! Thank you!
@danihlzita234510 ай бұрын
Worked out perfectly! Thanks a lot!!!
@dragonladycrafts10 ай бұрын
Thank you so much. This helped me out a lot.
@jonathanbriones32359 ай бұрын
hey guys, this is the way. it worked for me!
@shailkardani81593 жыл бұрын
Those who started learning Django for the first dont start. First watch the Flask series by Corey. This series will then be much easier for you. Both the series are master class. You wont find such rich content on any other platform.
@ashrafulfuad29675 жыл бұрын
Thank you so much I learned total django from your tutorial series . now my project is going on
@mhmt_dmr4 жыл бұрын
Thanks Corey for the perfect lessons. 40 dislike comes from udemy sellers :)
@PrieyudhaAkaditaS4 жыл бұрын
The best django tutorial ive ever seen. Thankyou
@paridhigupta27472 жыл бұрын
Best teacher ever.
@abdulahamer62384 жыл бұрын
Super cool adding features and helping to put students in a user mindset to see functionality and feedback that users will enjoy and will help make things feel intuitive and easy to use
@fariborzseyedi97114 жыл бұрын
Very Very nice videos. thank you Corey. I will suggest this tutorial to every one that want learn Django.
@wentaoqiu40725 жыл бұрын
You’re a teaching god.
@derekkroeker45823 жыл бұрын
3:37 Got that one many times... Didn't get exactly "TemplateDoesNotExist" on the other videos, but this time yes.
@Marek-zt9fy5 жыл бұрын
I love your tutorials, you're amazing man, keep it up!
@pratikchakravorty66235 жыл бұрын
Great video. Just one small thing to not let the user go back and access the register and login page after they have logged in add the redirected_authenticated_user=TRUE to the login path in the project's urlconf and also add a check to the register view. You can access the user using request.user
@SandeepPareek13 жыл бұрын
oh you are the best guy !.... really good tutorials.. keep the good work up .. 1000 thumbs up for you .
@superrelaxation508 Жыл бұрын
Going amazing so far best instructor suggest according to chatgpt and it is true thanks sir
@moebazzi84126 жыл бұрын
AMAZING AND CLEAR TUTORIALS WELL DONE COREY!!!
@lkarthik19856 жыл бұрын
Hi Corey, Thanks for this excellent video.
@albertoleaplaza30484 жыл бұрын
The Best Videos I have seen so far!!!!
@namesare4fools5 жыл бұрын
LOVE IT !! I would like to see a more advance django tutorials.. :)
@harshbhatt45273 жыл бұрын
Sir great work I have not seen a django playlist like this!!!
@ashG12345 жыл бұрын
Dear Corey THANK YOU for producing such wonderful videos. Much appreciated. I would request you to produce 2 more videos - 1) Token Based authentication (must required for REST apps) and 2) Use of the token for fetching information.
@xintongliu80684 жыл бұрын
Brief conclusion for the video: 1. how to create login, logout and simple profile page. Unlike register, login are provided by django, so remember to check settings.py when you play with login. 2. how to use decorator for profile in view.py.
@ahmedbadal37954 жыл бұрын
Hey bro the login form is not generating only login button is there and there is not error
@jear35596 жыл бұрын
Hi Corey, Thanks for this tutorial... it helps me a lot...
@wozdog74254 жыл бұрын
something about you Corey ... I always come away feeling smarter !!
@muhammadyaseenmughal35373 жыл бұрын
BEST SERIES ON INTERNET , I'm LOVING IT :) Have a question! While accessing profile without login, How can we show Some message on top of Login Page like 'Login First' ?
@josephkubinski91183 жыл бұрын
If else! If authen the render Else, render normal login page and make an alert message
@gabrieludoudo27185 жыл бұрын
Thanks Sir for giving us the best Django videos on KZbin , Please can you do a video on how to upload audio file in django
@piacademy19913 жыл бұрын
Can you do a tutorial on how you learn all this stuff, That'd be real cool!!
@vladadidko39326 жыл бұрын
Thank you, Corey! You're the best)
@boomnj1275 жыл бұрын
thank you for every thing. you are the best teacher
@sahilbisht36614 жыл бұрын
simply awesome thank you so much sir these videos helped me a lot love from India !!
@teddytalks4994 жыл бұрын
Thanks Corey
@Raphael-bq1fc2 жыл бұрын
Thank you very much! exactly what I was searching for; even more..
@ralphcaritativo20335 жыл бұрын
DONE TUTORIAL #7! Thank you SENPAI! :)
@jamatiasabirdfarming77603 жыл бұрын
very easy and helpful series, thank you Corey.
@osamakhan53815 жыл бұрын
Epic Tutorials, Keep up the good work
@sanjaydangwal25014 жыл бұрын
these tutorials are very helpful.
@adamtak31286 жыл бұрын
Question : How do you know what to import and where to import it from? That's the most confusing part of django to me. Thanks,
@coreyms6 жыл бұрын
Hey there. You need to look in then documentation for that information. I have memorized certain imports, but constantly find myself in the documentation for others
@paulohsgoes19594 жыл бұрын
Another great tutorial of yours. Congrats!
@gavinmurambadoro2 жыл бұрын
Django really compares well with Symfony Framework but I feel like it has a better developer experience. Thanks for this.
@suneelarumalla6 жыл бұрын
Nice videos,thanks for all your hard work
@md.soleymankhan65504 жыл бұрын
Best Django tutorial.
@saliksheraz62364 жыл бұрын
Great and helpful tutorials
@PrashantKumar-nb5ig4 жыл бұрын
Great Video sir
@xmuta4 жыл бұрын
Great video tutorial
@shashanksharmadon42954 жыл бұрын
Awesome bro thanks best video ever.....
@patrickknows22963 жыл бұрын
Corey deserve some 🍻
@MiguelSantos-dl4il6 жыл бұрын
Hey Corey! Thank you for the great tutorials and your effort. I would like to ask a question: how do you remember which module to import?
@aminuolawale18434 жыл бұрын
It's not about remembering what module you ought to import at any stage of your coding. It's about what you actually need and where it is located. If you need your register view, it'd be located in your views.py so that is the module you would import.
@tpz14744 жыл бұрын
@@aminuolawale1843 probably not the question that OP was asking. I'd think the question is about remembering the "django.contrib.auth.decorators" / "django.shortcuts" etc.
@akramnarejo62215 жыл бұрын
Corey you're amazing really a great blessing. thanks man.
@TUSHAR-mj1en3 жыл бұрын
Love from India Thank u BHAI
@sarunasj5 жыл бұрын
This is amazing. Simple and to the point. I'm now going to go back to Part 1. Thank you!
@petergames48192 жыл бұрын
Love these tutorial videos! Thanks!
@juniormichaelseri52125 жыл бұрын
Fantastic tutorial!
@TRGIZATION3 жыл бұрын
Your videos are really helpful. Thank you
@najeebmoneeb4 жыл бұрын
A very help full tutorial sir
@grouchydrago13964 жыл бұрын
thank god Django does all the hard stuff for me ;)
@SumanthLazarus4 жыл бұрын
There is always a trade-off somewhere; I've learnt to understand this as a developer. As long as Django allows option customization, I'm content to use it.
@thiagonunes27512 жыл бұрын
Brilliant videos, congratulations!!!!
@heavylifter6 жыл бұрын
This is the very best tutorial I have ever seen in youtube! Thank you very much!!!! One question, is there a way to log in with email without customizing the user model?
@coreyms6 жыл бұрын
You can find how to do that within the Django documentation, but it is a little complicated.
@jasongray42704 жыл бұрын
Good question, I was wondering the same. So I found the Django documentation and yes it is complicated. Is there an easier solution now?