{% for key, value in axchoicesbasic.items %}
diff --git a/rowers/views.py b/rowers/views.py
index 4ba74c6e..8f17bfdc 100644
--- a/rowers/views.py
+++ b/rowers/views.py
@@ -7844,6 +7844,12 @@ def workout_comparison_view2(request,id1=0,id2=0,xparam='distance',
row1 = Workout.objects.get(id=id1)
row2 = Workout.objects.get(id=id2)
+ mayedit = 0
+ if request.user == row1.user.user:
+ mayedit=1
+ if checkworkoutuser(request.user,row1):
+ mayedit=1
+
if row1.workouttype != 'water' or row2.workouttype != 'water':
axchoicespro.pop('slip')
axchoicespro.pop('wash')
@@ -7861,6 +7867,7 @@ def workout_comparison_view2(request,id1=0,id2=0,xparam='distance',
'teams':get_my_teams(request.user),
'id1':id1,
'id2':id2,
+ 'mayedit':mayedit,
'axchoicesbasic':axchoicesbasic,
'axchoicespro':axchoicespro,
'noylist':noylist,
diff --git a/rowsandall_app/urls.py b/rowsandall_app/urls.py
index 85b85107..64e2a3dc 100644
--- a/rowsandall_app/urls.py
+++ b/rowsandall_app/urls.py
@@ -17,6 +17,7 @@ from django.conf.urls import url,include
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
+from django.views.generic import TemplateView
from rowsandall_app.views import rootview
from django.contrib.auth import views as auth_views
from rowers import views as rowersviews
@@ -50,6 +51,8 @@ urlpatterns = [
]
urlpatterns += [
+ url(r'^robots\.txt$', TemplateView.as_view(template_name='robots.txt',
+ content_type='text/plain')),
url(r'^admin/', admin.site.urls),
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
url(r'^$',rootview),
diff --git a/templates/robots.txt b/templates/robots.txt
new file mode 100644
index 00000000..cf703932
--- /dev/null
+++ b/templates/robots.txt
@@ -0,0 +1,19 @@
+User-Agent: *
+
+Disallow: /rowers
+Disallow: /cvkbrno
+Disallow: /admin
+
+Allow: /rowers/api-docs
+Allow: /rowers/physics
+Allow: /rowers/partners
+Allow: /rowers/email
+Allow: /rowers/about
+Allow: /rowers/brochure
+Allow: /rowers/developers
+Allow: /rowers/compatibility
+Allow: /rowers/videos
+Allow: /rowers/analysis
+Allow: /rowers/promembership
+Allow: /rowers/planmembership
+Allow: /rowers/legal