aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2023-03-22 20:04:37 +0100
committerDaniel Schadt <kingdread@gmx.de>2023-03-25 13:16:45 +0100
commit5cfba8d37ca07fc4e61fe979c169da8c7baba850 (patch)
tree56127740ab59636293c51d0d63263f13df1ab679
parent7e2ed3206897632c59ce62e7e19852d04b4c256e (diff)
downloadfietsboek-5cfba8d37ca07fc4e61fe979c169da8c7baba850.tar.gz
fietsboek-5cfba8d37ca07fc4e61fe979c169da8c7baba850.tar.bz2
fietsboek-5cfba8d37ca07fc4e61fe979c169da8c7baba850.zip
add docstrings
-rw-r--r--fietsboek/models/user.py1
-rw-r--r--fietsboek/views/profile.py6
2 files changed, 6 insertions, 1 deletions
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