Django 3 : Create a Django form

Django forms work with an object that inherits from the Form class. This object will handle much of the work we have done manually in the previous post.

Step 1 : Add the following URL to your urls.py file:

Step 2 : We will create our view in the views.py file with the following lines:

Step 3 : We set the template for this view. The template will be much shorter. The following is our template in template/create_profile_forms.html

Step 4 : Now start the development server with the python manage.py runserver command and open http://127.0.0.1:8000/create-profile-forms in your browser.