1
00:00:00,090 --> 00:00:04,860
Hey guys, welcome to day 57 of 100 Days of Code. Today

2
00:00:04,860 --> 00:00:09,480
we're going to be digging deeper into building more advanced Flask applications.

3
00:00:10,050 --> 00:00:12,720
And in order to do that, we're going to be learning about URL

4
00:00:12,720 --> 00:00:15,630
building and templating with Jinja.

5
00:00:16,470 --> 00:00:19,470
So very often when you're creating a website,

6
00:00:19,800 --> 00:00:24,800
you'll get cases where you actually don't want to create the page entirely from

7
00:00:24,810 --> 00:00:26,520
scratch. For example,

8
00:00:26,520 --> 00:00:31,520
if you had a blog and you wanted to have several different posts in the blog,

9
00:00:32,430 --> 00:00:36,660
you don't want to create a separate HTML file for each blog post.

10
00:00:37,140 --> 00:00:37,920
So in that case,

11
00:00:37,920 --> 00:00:42,920
it's really helpful to have a templating language where you can replace bits of

12
00:00:43,650 --> 00:00:46,290
that blog with dynamic content.

13
00:00:47,250 --> 00:00:48,960
And that's where Jinja comes in.

14
00:00:49,230 --> 00:00:52,080
This is a templating language built for Python,

15
00:00:52,530 --> 00:00:55,890
and it's going to allow us to create the general layout of our blog,

16
00:00:56,070 --> 00:01:00,720
the styling and the structure, and then to replace the content, for example,

17
00:01:00,720 --> 00:01:05,720
the title or the subtitle or the body with dynamic content

18
00:01:05,910 --> 00:01:09,420
that's generated each time we load a specific page.

19
00:01:10,320 --> 00:01:12,210
And by the end of today,

20
00:01:12,240 --> 00:01:16,980
you will have built a very simple blog with a number of blog posts.

21
00:01:17,220 --> 00:01:19,560
So here we can see the title and subtitle.

22
00:01:19,920 --> 00:01:23,460
And then when we click on read to see the blog post in detail,

23
00:01:23,730 --> 00:01:25,650
we go to a different page.

24
00:01:25,980 --> 00:01:29,970
And depending on which of these blog posts we've clicked on,

25
00:01:30,240 --> 00:01:33,690
you can see that we're rendering basically the same layout,

26
00:01:33,720 --> 00:01:36,300
the same styling and the same structure,

27
00:01:36,540 --> 00:01:39,570
but each time for each of these pages,

28
00:01:39,930 --> 00:01:44,160
we're getting some different content. So that's the goal.

29
00:01:44,550 --> 00:01:48,270
And once you're ready, head over to the next lesson and we'll get started.

