Open kkyueing opened 4 years ago
ok i will check that link. thank you!
so it will exist two list once is categories of article and another is bodies of each articles that appear by click. am i right?
I guess there will be a page showing a list of boards, and each board will contain a list of articles. When a user clicks one of those articles, then the second page will be opened. The second page should show a body of the article just clicked.
If there are two boards, and each board contains two articles, logical structure of data would be like this:
- board_id: 0
board_title: Board A
articles:
- article_id: 0
title: Blah
body: Blah
- article_id: 1
title: Blah
body: Blah
- board_id: 1
board_title: Board B
articles:
- article_id: 2
title: Blah
body: Blah
- article_id: 3
title: Blah
body: Blah
And there will be two url patterns:
/index
: A page shows a list of boards and list of article titles for each boards./boards/<board_id>/<article_id>
: A page shows a body of a specific article in a specific board. For example, /boards/1/2
will show a body of article with board_id==1
and article_id == 2
.What do you think? :)
Clicking a title of an article in a list should load a new page containing a body of the article. This should be done after we finish #12 and #13.
This tutorial would be useful: Programmatically create pages from data