POST method problem in Django & Solution

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends welcome to bid learning club in this video i will show you one error so when you are trying to create a post method and let me show you so here is the register html so you can see the form and the method is post action is dot and now here this is the function register and here if requested method equal to post okay so when you fill the register form and then so when you just fill the form and just click on register actually what will happen so i just print this and just give a email id and this is the username and this is the password just password and confirm password i feel all of these things but just create i just click on register so it will not execute the post method actually i just show you so it will not execute this block and directly it will execute this else block that means no post method so just you can see this this is the no post method so all are right but what is the problem so for this register just go to urls.fi so for this register the namespace is register okay so now just go to views and this is the register and this is the function now just go to view this is the function register now this is the register function and this is the if block if request method equal to post and here is the else block that means no post method so render and render register.html go to register.html and here this method is post but you need to change the action so what is the name space name space is the url and namespace is the register so just copy this register and now go to register.html now just remove this dot and now just type here url and now just paste the namespace register so now save it so everything is fine now run the server again okay so just run the server python manage dot d y run what and now just go to the local host and now fill the form again just give our email id username ggg password ggg and confirm password cg so now click on register so this time it is worked okay so here is success and what is this success actually this is this thing that means user user is now saved okay so this is basically the fix of the error so in the next video i will upload full authentication system in django by user and you will get a free pdf of this authentication system how can any user register on your site how can any user login your site how can any user log out so i will upload a full video in the next so thank you for watching this tutorial [Music]
Info
Channel: B Learning Club
Views: 4,286
Rating: undefined out of 5
Keywords: django, django tutorial, get method in django, post method in django, python django, request methods used in django, post method not allowed - django, post, get, request post in django, post method problem, post method problem and solution in django
Id: aRXK7wWky5s
Channel Id: undefined
Length: 4min 12sec (252 seconds)
Published: Sat Jun 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.