From the course: Introduction to Django
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Forms - Django Tutorial
From the course: Introduction to Django
Forms
- Okay, so now let's talk about Django Forms, and honestly, this is the one of the features of Django that I use the least just because it hasn't been necessary for many of my projects, but it's a cool feature of Django. You can define forms in Django using Python, kind of the similar way that we define our database schema in Python using models, then you can render them in the template in different formats like so, like there's these different ways to display them, but it can take a lot of custom CSS to make these look good. If you're using a CSS framework and want to easily style the forms, you can use third-party extensions like django-crispy-forms. I'm using django-bulma, and so I've got a form that looks like this. So, I would say like the visual representation of the form is not the most handy part of it, it's actually being able to define it in the backend and doing validation and saving the data. If you're going to use forms for something, you would definitely use it for that.…
Contents
-
-
-
-
-
-
(Locked)
Django architecture10m 45s
-
(Locked)
Django project structures6m 55s
-
(Locked)
Example project overview7m 53s
-
(Locked)
Deployment settings16m 17s
-
(Locked)
Django ORM: Models10m 10s
-
(Locked)
Django ORM: Queries15m 39s
-
(Locked)
Django ORM: Migrations5m 19s
-
(Locked)
The user model7m 37s
-
(Locked)
URLs8m 50s
-
(Locked)
Views11m 20s
-
(Locked)
Class-based views3m 38s
-
(Locked)
Admin8m 19s
-
(Locked)
Front end5m 14s
-
(Locked)
Templates8m 7s
-
(Locked)
Forms8m 17s
-
(Locked)
-