From 5cfba8d37ca07fc4e61fe979c169da8c7baba850 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 22 Mar 2023 20:04:37 +0100 Subject: add docstrings --- fietsboek/models/user.py | 1 - fietsboek/views/profile.py | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fietsboek/models/user.py b/fietsboek/models/user.py index 82be8d7..58a04bd 100644 --- a/fietsboek/models/user.py +++ b/fietsboek/models/user.py @@ -157,7 +157,6 @@ class User(Base): return track def __acl__(self): - # Basic ACL: Permissions for the admin, the owner and the share link acl = [ (Allow, "group:admins", ALL_PERMISSIONS), (Allow, f"user:{self.id}", ALL_PERMISSIONS), diff --git a/fietsboek/views/profile.py b/fietsboek/views/profile.py index 94133f0..6bd566a 100644 --- a/fietsboek/views/profile.py +++ b/fietsboek/views/profile.py @@ -1,3 +1,4 @@ +"""Endpoints for the user profile pages.""" import datetime import sqlite3 @@ -26,6 +27,11 @@ def round_to_seconds(value: datetime.timedelta) -> datetime.timedelta: request_method="GET", ) def profile(request: Request) -> dict: + """Shows the profile page. + + :param request: The pyramid request. + :return: The template parameters. + """ total_length = 0.0 total_uphill = 0.0 total_downhill = 0.0 -- cgit v1.2.3