1
00:00:00,270 --> 00:00:06,420
So at this point, we can add the users to the database by writing them in these textboxes and pressing

2
00:00:06,420 --> 00:00:07,200
the submmit button.

3
00:00:07,680 --> 00:00:12,000
Now let's show another page when the user press submit.

4
00:00:14,230 --> 00:00:20,470
Well, we can do that the same way we did when we switched from LoginScreen to sign up screen.

5
00:00:20,680 --> 00:00:28,360
So the way we did that was by writing in the sign up function of the LoginScreen class.

6
00:00:28,600 --> 00:00:33,460
We wrote this self.manager.current equals to "sign_up_screen.

7
00:00:33,730 --> 00:00:36,050
We can do the same thing in here.

8
00:00:36,820 --> 00:00:42,370
So the add user function is what it's called when the user press the submit button.

9
00:00:43,120 --> 00:00:56,860
So we can do self.manager.current equal to, let's call this "sign_up_screen_success".

10
00:00:57,640 --> 00:01:04,470
So this is going to be another screen that we are going to list here.

11
00:01:04,960 --> 00:01:05,860
SignUp

12
00:01:07,610 --> 00:01:10,310
ScreenSuccess.

13
00:01:14,020 --> 00:01:19,520
The name of that should be the same as you used in there.

14
00:01:20,440 --> 00:01:28,090
And of course, we need to create that screen, so SignUpScreenSuccess.

15
00:01:30,880 --> 00:01:33,910
A colon.

16
00:01:34,870 --> 00:01:43,330
And what I do like this page to look like is, I'd like this page to have a label where it says sign up successful

17
00:01:44,180 --> 00:01:51,160
and then it should have a button under that label, which would say a login page.

18
00:01:51,370 --> 00:01:57,820
So the user can press the button and go back to the logging page where they can log in, so to the login

19
00:01:57,850 --> 00:01:58,480
screen.

20
00:01:59,980 --> 00:02:03,250
Therefore, first of all, we need a GridLayout.

21
00:02:06,100 --> 00:02:08,710
We just need one column and then we need a label.

22
00:02:10,240 --> 00:02:11,620
The text of that would be:

23
00:02:15,470 --> 00:02:18,770
"Sign up successful" in quotes.

24
00:02:19,210 --> 00:02:20,680
And then you need a button.

25
00:02:24,500 --> 00:02:28,300
The text of the button would be the login page.

26
00:02:29,180 --> 00:02:31,370
And let's leave it like that for now.

27
00:02:32,480 --> 00:02:36,300
I'm just going to execute everything to see what we have this far.

28
00:02:36,860 --> 00:02:40,280
So we got an error, factory exception.

29
00:02:40,520 --> 00:02:43,350
Of course, we don't have this sign up screen success.

30
00:02:44,090 --> 00:02:45,590
So we need to add a class.

31
00:02:48,330 --> 00:02:59,420
SignUpScreenSuccess, which inherits from Screen and let's do pass there execute again. Named screen

32
00:02:59,420 --> 00:03:00,050
is not defined.

33
00:03:00,080 --> 00:03:02,930
Yes, I made a typo here. Screen.

34
00:03:06,010 --> 00:03:14,120
Sign up, u3, p3 submit. Sign up successful! The label and log in page, which doesn't do

35
00:03:14,120 --> 00:03:20,350
anything for now because we don't have a on-press attribute for that

36
00:03:20,490 --> 00:03:21,060
button.

37
00:03:24,650 --> 00:03:26,800
So you have to wrap it up, this is what

38
00:03:26,930 --> 00:03:33,020
we did to implement this screen, to change the next screen.

39
00:03:33,170 --> 00:03:35,840
So first we added a self manager

40
00:03:35,840 --> 00:03:38,840
dot screen in the add user function.

41
00:03:39,260 --> 00:03:45,410
That will change the current screen to this screen in here.

42
00:03:45,920 --> 00:03:52,790
And this screen has been defined in here and it's represented by this class in Python.

43
00:03:53,620 --> 00:03:54,290
And that's it.

44
00:03:54,380 --> 00:04:00,280
So one, two, three and four points.

45
00:04:00,530 --> 00:04:01,820
We had to add.

46
00:04:02,130 --> 00:04:06,170
Now try as an exercise to implement the log in button.

47
00:04:06,350 --> 00:04:11,150
So when the user presses the logging button in the page, you want to

48
00:04:13,990 --> 00:04:21,530
sign up, u4, p4 for when the user presses login, go back to the main page.

49
00:04:21,680 --> 00:04:26,480
So to the login page, which is this one in here. Try to do that.

