May 2018
Beginner to intermediate
526 pages
11h 57m
English
Let's start by building the form to share posts. Django has a built-in forms framework that allows you to create forms in an easy manner. The forms framework allows you to define the fields of your form, specify how they have to be displayed, and indicate how they have to validate input data. The Django forms framework offers a flexible way to render forms and handle the data.
Django comes with two base classes to build forms:
First, create a forms.py file inside the directory of your blog application and make it look like this:
from django import forms class EmailPostForm(forms.Form): name = forms.CharField(max_length=25) ...
Read now
Unlock full access