A blueprint allows you to store related page handlers together. Let’s add the following URLs to our app: /account/create, /account/login, and /account/logout. The logical place to store the handlers for these URLs is in an module.

Add the following lines to

import account

Create an file with the following code:

from drakken.core import Blueprint
bp = Blueprint(name='account', url_prefix='/account')

def create(request, response):
    response.text = 'This is the create account page.'

def login(request, response):
    response.text = 'This is the login page.'

def logout(request, response):
    response.text = 'This is the logout page.'

Launch the app and visit You should see the message This is the login page.