1
00:00:01,320 --> 00:00:06,630
Hey there, welcome to this new section of the course, and this is one of the last sections that we

2
00:00:06,630 --> 00:00:10,050
are having, and in this section

3
00:00:10,290 --> 00:00:14,970
we're going to dive into the world of Web applications with Python.

4
00:00:16,380 --> 00:00:21,580
And yeah, the website that you're looking at is a web application built with Python,

5
00:00:21,660 --> 00:00:24,360
so this is what you're going to build in this section.

6
00:00:24,840 --> 00:00:27,400
And all of this was built with Python and Flask.

7
00:00:28,020 --> 00:00:37,140
And also we're using a PostgreSQL database in here to store data and then we use Heroku to deploy the

8
00:00:37,140 --> 00:00:38,210
application online.

9
00:00:39,630 --> 00:00:41,310
And yes, as you see, this is online now

10
00:00:41,340 --> 00:00:43,760
and it can be accessed through this URL.

11
00:00:45,150 --> 00:00:46,490
Now, what this does, well.

12
00:00:47,850 --> 00:00:52,950
It's simple, but you can modify it and do whatever you want with that.

13
00:00:53,400 --> 00:00:59,280
In my case, what I did is, you know, I'm asking the users, the visitors to enter their email address

14
00:00:59,820 --> 00:01:00,420
and their height.

15
00:01:00,850 --> 00:01:02,580
What the application will do is

16
00:01:02,730 --> 00:01:05,970
once it gets to this pair of data from the user,

17
00:01:06,810 --> 00:01:13,350
it sends the data to the database, to the server are then it calculates the average height of all the

18
00:01:13,350 --> 00:01:15,600
users that have been submitting data

19
00:01:15,960 --> 00:01:16,410
so far.

20
00:01:17,490 --> 00:01:22,140
And then it sends the average to the user that just submitted their email address.

21
00:01:22,620 --> 00:01:26,700
So it sends the average height there by email to the user.

22
00:01:27,330 --> 00:01:28,650
So all this is automatic.

23
00:01:30,360 --> 00:01:35,220
Yeah, let me test this, so you may want to pass your email address there and your height.

24
00:01:37,580 --> 00:01:39,170
You know, this also has some restrictions.

25
00:01:39,320 --> 00:01:48,260
You can not pass a hight of more than, let's say, three meters and you press submit, and once

26
00:01:48,260 --> 00:01:49,230
that is successful

27
00:01:49,250 --> 00:01:52,090
the user will be sent to a success page.

28
00:01:53,000 --> 00:01:59,210
So they get the confirmation that their submission was successful and that the user will get an e-mail

29
00:01:59,210 --> 00:02:01,900
to their email address, email accounts.

30
00:02:02,810 --> 00:02:04,910
So I send my height using my hotmail address.

31
00:02:04,940 --> 00:02:06,530
And here is the email that I got.

32
00:02:09,320 --> 00:02:15,860
And I'm using my Gmail address to send emails to the users, and I used my Hotmail dress as a visitor.

33
00:02:17,510 --> 00:02:22,610
Yeah, you get this email automatically so height that I answered there was 1.76

34
00:02:22,610 --> 00:02:23,930
and this is the average height.

35
00:02:25,540 --> 00:02:28,650
And yeah that's, uh, some sort of confirmation email.

36
00:02:29,150 --> 00:02:32,630
And it also gives you the number of people that have been registered this far.

37
00:02:33,800 --> 00:02:36,500
So, yeah, that's the application that you're going to build.

38
00:02:37,250 --> 00:02:40,160
I encourage you to really learn how to do this.

39
00:02:40,910 --> 00:02:41,870
This is quite interesting.

40
00:02:41,880 --> 00:02:43,610
And you'll learn a lot from this.

41
00:02:43,640 --> 00:02:50,330
You'll learn how to store data in a database from your Web application and send data via email to

42
00:02:50,330 --> 00:02:50,870
users.

43
00:02:51,610 --> 00:02:52,160
And so on.

44
00:02:53,690 --> 00:02:54,800
So let's keep going.

45
00:02:54,830 --> 00:02:56,670
And I'll talk to you in the next lecture.

