Insert Data in Database using Form – Django Web Development Tutorial 10

Video is ready, Click Here to View ×

Welcome to another tutorial of Django web development tutorial series.

Today we are going to discuss how to insert data into the database using form.

One important thing to keep in mind that {% csrf_token %} is compulsory to add inside the form tag.

Download source code of the project that we created in this tutorial from here:

You can contact me at my email.

If you have any problems or…


  1. Unable to access source code in the given link. Getting a 404. Can you please check and share the source code? I followed the steps as told in the video but my view method for Submit Button is not getting invoked. No errors either.

  2. sir I am Creating a signup form but I am not able to do it all the time the data is not going into database,can u please tell how can we create our own form but not by the default model provide by Django,Please help as soon

  3. i have been looking for this since last 1 month in youtube, i searched alot but unfortunately i got nothing regarding this however finally i got this video, thanks for teaching us

  4. Hi sir,

    I have created a html form using django in pycharm. i am able to post the request and able to pass that parameter from html form and able to get the passed values in python as integer as given (i.e a = request.POST.get("a_value") , a = request.POST.get("a_value") )and able to print in print(a,b), but not able to sum(i.e c =a+b) and throwing error has given below ..TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'.
    python 2.7
    could you please suggest

Leave a Reply

Your email address will not be published.