From 7384c8c8adde0b9750ee251c85f4c07a6ed3aaa5 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Fri, 16 Mar 2018 08:38:55 +0100 Subject: [PATCH] added robotx.txt & improved comparison chart --- rowers/models.py | 2 ++ rowers/templates/comparisonchart2.html | 23 +++++++---------------- rowers/views.py | 7 +++++++ rowsandall_app/urls.py | 3 +++ templates/robots.txt | 19 +++++++++++++++++++ 5 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 templates/robots.txt diff --git a/rowers/models.py b/rowers/models.py index c500576e..f8e75a01 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -711,6 +711,8 @@ class BasePlannedSessionFormSet(BaseFormSet): # Check if workout is owned by this user def checkworkoutuser(user,workout): + if user.is_anonymous(): + return False try: r = Rower.objects.get(user=user) teams = workout.team.all() diff --git a/rowers/templates/comparisonchart2.html b/rowers/templates/comparisonchart2.html index a07b41bd..1fd119fe 100644 --- a/rowers/templates/comparisonchart2.html +++ b/rowers/templates/comparisonchart2.html @@ -50,25 +50,16 @@ -
- - - -
-

 

+
+

+ Swap Workouts +

+