fietsboek.models.journey module¶
Journey model definition.
A Journey is an ordered collection of tracks, with a title and (optionally) a description.
- class fietsboek.models.journey.Journey(**kwargs)¶
Bases:
BaseA
Journeyrepresents a collection of tracks, with a title and description.- classmethod factory(request)¶
Factory method to pass to a route definition.
This factory retrieves the journey based on the
journey_idmatched route parameter, and returns the journey. If the journey is not found,HTTPNotFoundis raised.
- gpx_xml()¶
Returns a GPX XML that represents this journey.
- Return type:
- Returns:
The XML file.
- set_track_ids(track_ids)¶
Sets the IDs of the contained tracks.
The order is relevant and will be saved.
Needs to have a session, as it will directly issue INSERT statements.
- visibility: Mapped[Visibility]¶