Creating a URL scheme
URLs are for people, therefore they should be easy to remember. A good URL scheme is easy to remember when it accurately reflects the implicit structure of the website. Our goal is to create a URL scheme that makes it easy for the visitors on our site to find blog entries on topics that interest them.
Referring back to the spec we created in Chapter 1, Creating Your First Flask Application, we know that we want our blog entries to be organized by tag and by date. Entries organized by tag and date will necessarily be a subset of the collection of all entries, so that gives us a structure like this:
URL |
Purpose |
---|---|
|
This displays all of our blog entries, ordered most-recent first |
|
This contains all ... |
Get Learning Flask Framework now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.