fietsboek.models.badge module

The Badge model.

class fietsboek.models.badge.Badge(**kwargs)

Bases: Base

Represents a badge.

Badges have a title and an image and can be defined by the admin.

Variables:
classmethod factory(request)

Factory method to pass to a route definition.

This factory retrieves the badge based on the badge_id matched route parameter, and returns the badge. If the badge is not found, HTTPNotFound is raised.

Raises:

pyramid.httpexception.NotFound – If the badge is not found.

Parameters:

request (Request) – The pyramid request.

Returns:

The badge.

Type:

Badge

id
image
title
tracks: Mapped[list[Track]]