O'Reilly logo

Learning Flask Framework by Charles Leifer, Matt Copperwaite

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

/entries/

This displays all of our blog entries, ordered most-recent first

/entries/tags/

This contains all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required