Forms can be shown in many ways. Nick walks through each of them in this video.
- [Instructor] Up 'til this point, … whenever we've had a Django form … we've just displayed it in the default way however it is. … You can see it's just sort of lined up left to right here. … There's actually a couple of different ways … that we can have our forms displayed, … and I'm going to show you how to do that now. … Let's go ahead and move back into our code … and we're going to go to our order.html, … and we're going to look at a couple different ways … to lay out our form. … First, inside of our order form here, … we have our pizzaform. … After pizzaform, we're going to do a .as_p, … and what this is going to do is it's going to display our form … in some paragraph tags. … Let's go ahead and save this, go back to our home page, … let's reload, and look at this. … If this is more of your style, having things top to bottom, … we can have that listed out there. … And, to really see what this looks like, … let's go ahead and inspect the HTML here, … and you can see here's our form, …
- Creating form fields
- Using submitted data
- Adding models
- Using the ModelForms class
- Working with widgets
- Accepting files and multiple forms on a page
- Customizing formsets
- Using local validation
- Delivering errors responsibly
- Customizing forms
- Styling with CSS
Skill Level Intermediate
Building RESTful Web APIs with Djangowith Rudolf Olah1h 9m Intermediate
1. Getting Started with Forms
2. Working with Advanced Form Features
3. Customizing and Styling Form Appearance
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.