1 00:00:00,060 --> 00:00:01,830 Front and park using bootstrap. 2 00:00:02,280 --> 00:00:05,190 Now I'm going to go with the back and forth. 3 00:00:05,550 --> 00:00:09,810 So today I'm going to show you how you can integrate your form with the back and part. 4 00:00:10,170 --> 00:00:13,710 So today we are going to basically work with the phones using two method. 5 00:00:13,740 --> 00:00:17,070 One is the request method and a local machine and try of the things. 6 00:00:17,460 --> 00:00:24,190 So I moved over here, so I had to find the phone using my phone. 7 00:00:25,620 --> 00:00:28,140 So this is a phone we are made in the previous lecture. 8 00:00:28,530 --> 00:00:36,330 So today what I'm going to do, what I'm going to do, so I'll create a button in this phone post. 9 00:00:36,540 --> 00:00:37,530 So I'll type. 10 00:00:38,700 --> 00:00:45,140 If class is equal to form group here you can see I have to find a phone for each input element. 11 00:00:45,720 --> 00:00:46,500 So form. 12 00:00:47,840 --> 00:00:48,260 Group. 13 00:00:48,520 --> 00:00:52,650 OK, now I'll define a button. 14 00:00:52,910 --> 00:01:01,340 So this button should be type to submit because I'm going to submit this form on what I define. 15 00:01:01,340 --> 00:01:09,140 A class is called a button button primary, and this would give me the default color of the button. 16 00:01:09,740 --> 00:01:18,720 And I type this submit as a button value to be shown on the printed part. 17 00:01:18,950 --> 00:01:26,660 So I move the speech and so this button I right click here quickly to inspect what changes I can do 18 00:01:26,660 --> 00:01:28,780 to make this, this more responsive and better. 19 00:01:29,120 --> 00:01:32,980 So I'll do margin zero or two. 20 00:01:33,020 --> 00:01:37,060 So this is a model auto used to turn to central element. 21 00:01:37,370 --> 00:01:40,360 So this doesn't work by time display block. 22 00:01:40,670 --> 00:01:41,180 This works. 23 00:01:41,420 --> 00:01:47,590 So I'll copy this test quickly and I'll give it a style element here. 24 00:01:48,410 --> 00:01:54,170 It's time and I quickly copied and pasted here and this looks pretty fine. 25 00:01:54,300 --> 00:01:55,580 So refresh this page. 26 00:01:56,770 --> 00:01:57,110 Yeah. 27 00:01:57,210 --> 00:01:58,150 Not a button. 28 00:01:58,820 --> 00:02:00,160 OK, not yeah. 29 00:02:00,410 --> 00:02:08,870 Not a button is in the center and now till I only defined the form and two things I'm missing in this 30 00:02:08,870 --> 00:02:17,650 form is one of the better method and another is the action sort of how you can work with these things. 31 00:02:17,870 --> 00:02:23,850 So we are going to cover in the first I'll go to my file and then you're with it. 32 00:02:24,020 --> 00:02:29,390 So I find a spot here, but some. 33 00:02:31,250 --> 00:02:41,510 My form and know what I'm going to do, submit my form is going to be yours, but I'm going to submit 34 00:02:41,510 --> 00:02:48,780 the form and you start submit my form and name is to submit my form. 35 00:02:48,980 --> 00:02:51,000 OK, nondestructive predefine. 36 00:02:51,410 --> 00:02:59,220 So I want to find us and the final sum in my form and method, in my view file. 37 00:02:59,630 --> 00:03:01,210 So I'll go to pick quickly. 38 00:03:01,510 --> 00:03:01,970 Go ahead. 39 00:03:02,180 --> 00:03:02,660 Death. 40 00:03:04,460 --> 00:03:05,300 Submit. 41 00:03:08,040 --> 00:03:19,250 Request and request that I do return tactical response or let me do one thing, go, OK? 42 00:03:21,360 --> 00:03:23,670 OK, define my dictionary here 43 00:03:26,340 --> 00:03:28,010 and there. 44 00:03:28,080 --> 00:03:33,310 One by one by two wide three. 45 00:03:35,550 --> 00:03:37,050 What I do request. 46 00:03:39,980 --> 00:03:42,210 Don't method. 47 00:03:44,000 --> 00:03:45,770 This would be the value of my right three. 48 00:03:46,610 --> 00:03:51,650 OK, and do one thing and keep this as. 49 00:03:53,300 --> 00:03:58,070 Method on this would be the best method. 50 00:03:58,100 --> 00:04:01,670 OK, so I'll define a disciplined response. 51 00:04:04,200 --> 00:04:11,870 Of my dictionary, I quickly all this thing, so what I'm going to do this with my form, so I'll define 52 00:04:11,900 --> 00:04:19,280 first action, I'll find a method here and that method first we will work with the method and then the 53 00:04:19,280 --> 00:04:20,000 post method. 54 00:04:20,070 --> 00:04:26,570 OK, so this is a great method here and get better and both method have a difference. 55 00:04:26,870 --> 00:04:29,400 So we get this in order to. 56 00:04:29,660 --> 00:04:34,280 What's the difference between the two forces to get an undefined action. 57 00:04:34,760 --> 00:04:40,310 So what I'm going to do, I'm going to use the short hand property to help to specify. 58 00:04:40,370 --> 00:04:41,090 Are you worried? 59 00:04:41,640 --> 00:04:50,840 And the person you are looking at, the person you are, and then a person sign so you can be a little 60 00:04:50,840 --> 00:04:51,950 bit familiar with this. 61 00:04:51,980 --> 00:04:53,660 So I have to find a shorthand notation. 62 00:04:54,110 --> 00:04:55,910 Both calibrates this person. 63 00:04:55,910 --> 00:04:56,250 You are. 64 00:04:56,660 --> 00:04:59,840 Then I'll define a name between this single code. 65 00:05:00,080 --> 00:05:01,000 This is both insane. 66 00:05:01,110 --> 00:05:09,920 Then Culebras says, look, I need to define the name where I have to submit and pass this form. 67 00:05:10,370 --> 00:05:15,500 And the name should be this name is my phone. 68 00:05:16,010 --> 00:05:22,830 And I need to submit my form to this road which has having the names of my form. 69 00:05:22,900 --> 00:05:25,680 OK, so I'll go here. 70 00:05:26,870 --> 00:05:33,440 So now I think this is pretty fine, so I have to follow your ID to submit my form and this form with 71 00:05:33,440 --> 00:05:34,550 this summer to do that. 72 00:05:34,820 --> 00:05:35,870 OK, that road. 73 00:05:36,530 --> 00:05:39,920 Now I haven't bothered to find the method as an action. 74 00:05:39,920 --> 00:05:40,310 Is this. 75 00:05:40,370 --> 00:05:49,580 OK, now what I'm having the I'm having an error and that is not to find the value of my keys in my 76 00:05:49,580 --> 00:05:50,070 dictionary. 77 00:05:50,720 --> 00:05:53,390 So what you can do. 78 00:05:53,870 --> 00:05:58,660 OK, course what I do, I come in this out and come this out. 79 00:05:58,670 --> 00:06:02,840 OK, so I'll tell you, show you one thing. 80 00:06:03,440 --> 00:06:04,430 OK, line. 81 00:06:04,940 --> 00:06:06,410 I'm having an error. 82 00:06:07,470 --> 00:06:09,150 We will talk to you a line to. 83 00:06:12,960 --> 00:06:13,170 Than. 84 00:06:17,100 --> 00:06:18,460 I'm handsome ever. 85 00:06:18,660 --> 00:06:19,560 Let me check. 86 00:06:22,760 --> 00:06:23,070 OK. 87 00:06:23,190 --> 00:06:31,060 No, overnight, sort of I'm sorry, sorry, so not I'm OK, so my form is already being summoned. 88 00:06:31,220 --> 00:06:34,690 So what I'm going to do first, I've only made a request or method. 89 00:06:35,060 --> 00:06:36,470 So what I'm going to do. 90 00:06:38,330 --> 00:06:40,670 I'll make a test. 91 00:06:43,000 --> 00:06:46,930 Test, OK, I'll make a different value that's evolved. 92 00:06:48,480 --> 00:06:49,740 Now, I submit my full. 93 00:06:50,910 --> 00:06:53,120 Not what you can see here. 94 00:06:54,570 --> 00:06:55,170 Let me. 95 00:06:57,620 --> 00:06:59,530 I'm having some issue on my phone. 96 00:06:59,870 --> 00:07:00,440 OK? 97 00:07:01,930 --> 00:07:05,530 The subject my has been defined and motherhood has been kicked. 98 00:07:06,380 --> 00:07:06,840 OK. 99 00:07:14,340 --> 00:07:15,040 And. 100 00:07:19,480 --> 00:07:24,700 I did find the warn of some in my home. 101 00:07:27,780 --> 00:07:28,170 Ron. 102 00:07:30,200 --> 00:07:37,430 I knew it first day, but, yeah, no, this is very divine. 103 00:07:37,460 --> 00:07:40,520 OK, so now this is fine, totally fine, OK. 104 00:07:40,840 --> 00:07:42,350 I had some issues. 105 00:07:42,360 --> 00:07:43,340 I restarted myself. 106 00:07:43,510 --> 00:07:44,270 No, it's pretty fine. 107 00:07:44,490 --> 00:07:51,030 OK, so what I'm going to tell you that I'll quickly grab the things that I define a year or seven before 108 00:07:51,110 --> 00:07:51,330 then. 109 00:07:52,190 --> 00:08:00,680 This is my urine and now I have to find the action to disorient some reference here and method get. 110 00:08:00,920 --> 00:08:04,230 So that's when I went to this abuse or. 111 00:08:04,550 --> 00:08:05,560 My phone was caught. 112 00:08:05,870 --> 00:08:12,610 So when I went here, what I saw, I done a dictionary adjacent response, only making the method. 113 00:08:12,800 --> 00:08:15,340 So this method was basically. 114 00:08:16,280 --> 00:08:18,500 So what I got here, the method is Kit. 115 00:08:18,680 --> 00:08:21,080 OK, so how are you going to derive the values? 116 00:08:22,510 --> 00:08:29,880 So this is a one and two, so what are the main important thing, what would it be? 117 00:08:30,310 --> 00:08:38,050 So what you can see in the get method, you can see the name of the response, OK, sorry, the Parramatta's 118 00:08:38,080 --> 00:08:39,340 parameters, which are being. 119 00:08:39,860 --> 00:08:47,220 So I had my text, which I had put the data test and I had my text area, which I put to the test. 120 00:08:47,680 --> 00:08:51,480 OK, so you can see the name of the variables. 121 00:08:51,480 --> 00:08:55,740 So these variables are being separated by a question mark and the road is being separated. 122 00:08:55,740 --> 00:08:56,190 My four. 123 00:08:56,350 --> 00:09:02,770 OK, so what I'm going to do how you can use these values request. 124 00:09:03,580 --> 00:09:09,150 Don't get on the first is my text, OK? 125 00:09:09,430 --> 00:09:12,460 And this is the variable. 126 00:09:12,460 --> 00:09:16,360 I'm being different and another is my text area. 127 00:09:18,280 --> 00:09:20,620 OK, now I'll do one thing. 128 00:09:21,760 --> 00:09:25,170 So so I'm missing a comma sign. 129 00:09:25,180 --> 00:09:26,650 So that's why it's swingman error. 130 00:09:26,690 --> 00:09:32,510 Now this is pretty my request to look at what's going on here. 131 00:09:32,890 --> 00:09:33,670 OK, not fine. 132 00:09:34,120 --> 00:09:37,300 OK, now I'll move to my phone. 133 00:09:41,110 --> 00:09:42,510 My mom. 134 00:09:44,140 --> 00:09:51,150 I time new data, new Diba, No. 135 00:09:52,610 --> 00:09:55,700 Here you can see why one does not define. 136 00:09:58,680 --> 00:10:00,690 One is not defined. 137 00:10:02,560 --> 00:10:03,180 OK. 138 00:10:03,260 --> 00:10:03,680 Why is it. 139 00:10:05,400 --> 00:10:08,920 OK, ok, ok, ok, OK, so this is 140 00:10:15,000 --> 00:10:20,570 ok, ok, I'll find new data and new duba and I submit this for you. 141 00:10:20,680 --> 00:10:21,810 Now this is pretty fine. 142 00:10:21,820 --> 00:10:25,990 OK, so I apologize for all the errors. 143 00:10:26,170 --> 00:10:27,800 OK, now this is pretty fine. 144 00:10:27,820 --> 00:10:35,080 So you can see I move to this, submit my home and the parameters being my text, which has this data, 145 00:10:35,170 --> 00:10:39,940 new data you can see here, OK, this is not the school. 146 00:10:40,450 --> 00:10:46,930 And then I had another parameter, my text area here you can see with the values New Diba. 147 00:10:47,140 --> 00:10:49,850 Now here you can see this is new Diba, OK. 148 00:10:49,970 --> 00:10:51,330 And the method is get. 149 00:10:51,530 --> 00:10:54,380 OK, so, so this is the difference here. 150 00:10:54,380 --> 00:10:56,850 You can see the parameters on the upper hand. 151 00:10:57,100 --> 00:11:00,970 So, so here you can see on the around the parameters have been visible do so. 152 00:11:00,970 --> 00:11:03,030 This is the first property of the get method. 153 00:11:03,400 --> 00:11:08,220 So not another thing we are going to do, we are going to change this method to post. 154 00:11:09,730 --> 00:11:11,030 OK, so this is post. 155 00:11:11,280 --> 00:11:13,990 OK, now what I'm going to do a request. 156 00:11:14,320 --> 00:11:15,250 Don't post. 157 00:11:17,080 --> 00:11:18,490 So this will be post. 158 00:11:21,240 --> 00:11:24,890 Request dot post. 159 00:11:25,170 --> 00:11:31,110 OK, so this is another change I'm going to do, not the difference between the two first met and get 160 00:11:31,130 --> 00:11:36,510 change and now the rebels on this road won't be visible on the perimeter. 161 00:11:36,660 --> 00:11:40,460 OK, so I go my fault. 162 00:11:43,260 --> 00:11:46,400 Okay, I'll try some here. 163 00:11:48,090 --> 00:11:51,530 Python jangle framework. 164 00:11:53,740 --> 00:11:55,230 Now I submit this form. 165 00:11:57,670 --> 00:12:06,910 OK, now it says CRF verification failed because when you submit a form with the post method, you need 166 00:12:06,910 --> 00:12:08,880 to define a CRF token. 167 00:12:09,400 --> 00:12:16,950 So I quickly type person, see our own token. 168 00:12:21,670 --> 00:12:22,570 And this looks. 169 00:12:22,760 --> 00:12:23,620 No, this is fine. 170 00:12:24,180 --> 00:12:29,160 OK, so I'll make a submission here. 171 00:12:30,260 --> 00:12:32,120 OK, I'm in error. 172 00:12:32,520 --> 00:12:39,860 OK, I have to open up, I made a mistake, sorry, I made a mistake with the two curly braces. 173 00:12:39,900 --> 00:12:41,170 Sorry, I'm really sorry for this. 174 00:12:41,450 --> 00:12:42,770 So now this looks pretty fine. 175 00:12:43,220 --> 00:12:45,530 So I'll go back to my phone. 176 00:12:45,920 --> 00:12:47,740 This is Python, Python, Django, Pambo. 177 00:12:49,240 --> 00:12:51,490 If not, this is the trainmen erhu. 178 00:13:03,570 --> 00:13:11,190 And with this, I turn by turn, Django. 179 00:13:12,720 --> 00:13:14,280 And now, while some in this. 180 00:13:15,240 --> 00:13:25,050 OK, at this is fine, sorry, so I can see now the variables are being known there on the root, so 181 00:13:25,050 --> 00:13:27,340 the variable parameters are not there. 182 00:13:27,360 --> 00:13:29,670 So that's being hidden in the post method. 183 00:13:29,970 --> 00:13:32,440 Plus, you have a set of token here. 184 00:13:32,820 --> 00:13:35,610 OK, so I had some issues. 185 00:13:35,610 --> 00:13:40,030 I decided this is where I run with the python back to with the python, Django. 186 00:13:40,260 --> 00:13:45,380 So these are some what we call them as he didn't characters. 187 00:13:45,600 --> 00:13:50,100 So we tell you how you can clean this data and this method is both. 188 00:13:50,250 --> 00:13:53,940 So basically we work with the method and the method in this. 189 00:13:54,780 --> 00:13:59,300 And next in the next upcoming quarters, we're going to work with the database. 190 00:13:59,460 --> 00:14:00,180 So thank you, guys. 191 00:14:00,200 --> 00:14:00,990 Thank you so much.