From the course: Django: Forms
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Input confirmation
- [Narrator] So we'll go ahead and save this, this is all the code that we need inside of our views. Then, we're going to go ahead and move over to our order.html, and we're going to provide a little bit of information after our note. So we're going to say, all right, if we have a variable called created_pizza_pk, if this is something, and make sure whenever you make an if, you've got to have the ending if, so we're going to put and endif right at the end of there, but if we have this information, what we want to do is create an a tag, with an href, to take somebody to go edit their pizza. So the url that we're looking for here, go ahead and do our percentages, is we're going to say url edit_order, make sure that's all surrounded in a single quote there, but then we also have to provide that created_pizza_pk, so it knows exactly which one we're trying to go for. So with this a tag, let's go ahead and put some text in there like edit your order, and then we'll provide an ending a tag…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Adding models5m 59s
-
(Locked)
Model forms4m 1s
-
Working with widgets5m 37s
-
(Locked)
Advanced widgets4m 23s
-
(Locked)
Forms and files4m 4s
-
(Locked)
Formsets: Multiple forms on a page5m 18s
-
(Locked)
Formset views6m 34s
-
(Locked)
Controlling the number of formsets5m 40s
-
(Locked)
Editing objects4m 40s
-
(Locked)
Input confirmation4m 7s
-
(Locked)
-
-