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:
id (int) – Database ID.
title (str) – Title of the badge.
image (bytes) – Image of the badge.
tracks (list[fietsboek.models.track.Track]) – Tracks associated with this badge.
- 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.
- id¶
- image¶
- title¶