diff --git a/.gitignore b/.gitignore
index 7f7af7f0..031d78ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -69,4 +69,5 @@ config.yaml
/py2/
/py38/
/py39/
+/py39b/
/django2/
diff --git a/rowers/forms.py b/rowers/forms.py
index 3d9e3e86..4d6740c3 100644
--- a/rowers/forms.py
+++ b/rowers/forms.py
@@ -18,6 +18,8 @@ from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.contrib.admin.widgets import AdminDateWidget
from django.forms.widgets import SelectDateWidget, HiddenInput
+from django_recaptcha.fields import ReCaptchaField
+from django_recaptcha.widgets import ReCaptchaV3
from django.utils import timezone, translation
from django.forms import ModelForm, Select
@@ -235,11 +237,16 @@ class SearchForm(forms.Form):
# simple form for Contact page. Sends email to info@rowsandall.com
class EmailForm(forms.Form):
- firstname = forms.CharField(max_length=255)
- lastname = forms.CharField(max_length=255)
+ firstname = forms.CharField(max_length=255, label="First Name")
+ lastname = forms.CharField(max_length=255, required=False, label="Last Name")
email = forms.EmailField()
subject = forms.CharField(max_length=255)
message = forms.CharField(widget=forms.Textarea())
+ captcha = ReCaptchaField(widget=ReCaptchaV3(
+ attrs={
+ 'required_score': 0.85,
+ }
+ ))
disqualificationreasons = (
diff --git a/rowers/models.py b/rowers/models.py
index 9e156657..e5da3360 100644
--- a/rowers/models.py
+++ b/rowers/models.py
@@ -3700,7 +3700,7 @@ class Workout(models.Model):
elements = dict(
date = self.date.strftime('%Y-%m-%d'),
name = self.name,
- distance = str(self.distance),
+ distance = str(self.distance)+'m',
ownerfirst = self.user.user.first_name,
ownerlast = self.user.user.last_name,
duration = self.duration.strftime("%H:%M:%S"),
@@ -3727,7 +3727,7 @@ class Workout(models.Model):
if self.workouttype not in ['water','rower']:
try:
- stri = u'{date} {name} {distance}m {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
+ stri = u'{date} {name} {distance} {duration} {workouttype} {ownerfirst} {ownerlast}'.format(
**elements
)
except ValueError:
@@ -3736,7 +3736,7 @@ class Workout(models.Model):
return "No workout"
else:
try:
- stri = u'{date} {name} {distance}m {duration} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
+ stri = u'{date} {name} {distance} {duration} {workouttype} {boattype} {ownerfirst} {ownerlast}'.format(
**elements
)
except (ValueError, AttributeError):
diff --git a/rowers/templates/email.html b/rowers/templates/email.html
index 86fd7b2e..000d8013 100644
--- a/rowers/templates/email.html
+++ b/rowers/templates/email.html
@@ -1,136 +1,80 @@
{% extends "newbase.html" %}
{% block title %}Contact Us{% endblock title %}
{% block main %}
-
Contact us through email
-
- {% if form.errors %}
-
- Please correct the error{{ form.errors|pluralize }} below.
-
- {% endif %}
-
-
-
+
+
Contact us through email
+ {% if form.errors %}
+
+ Please correct the error{{ form.errors|pluralize }} below.
+
+ {% endif %}
+
+
+
-
Bug reporting, feature requests
-
-
- Bug reports and feature requests can be done through our BitBucket page. Please check on the following link if your bug or issue is a known one. Feel free to file any feature request.
-
+ Bug reports and feature requests can be done through our BitBucket page. Please check on the following link if your bug or issue is a known one. Feel free to file any feature request.
+
We run a facebook group where you can post questions and report problems,
+ especially if you think the wider user community benefits from the answers.
We run a facebook group where you can post questions and report problems,
- especially if you think the wider user community benefits from the answers.
+ When the site is down, this is the appropriate channel to look for apologies, updates, and offer help.
+
+
-
-
Twitter
+
+
Rowsandall s.r.o.
+
+
Rowsandall s.r.o.
+ Nové sady 988/2
+ 602 00 Brno
+ Czech Republic
+ IČ: 070 48 572
+ DIČ: CZ 070 48 572 (Nejsme plátce DPH)
+ Datová schránka: 7897syr
+ Email: info@rowsandall.com
+ The company is registered in the business register at the
+ Regional Court in Brno (Společnost je zapsána v obchodním rejstříku vedeném u Krajského soudu v Brně, oddíl C, vložka 105845)
+
- When the site is down, this is the appropriate channel to look for apologies, updates, and offer help.
-
-
+{% block sidebar %}
+{% include 'menu_help.html' %}
+{% endblock %}
-
-
Rowsandall s.r.o.
-
-
Rowsandall s.r.o.
- Nové sady 988/2
- 602 00 Brno
- Czech Republic
- IČ: 070 48 572
- DIČ: CZ 070 48 572 (Nejsme plátce DPH)
- Datová schránka: 7897syr
- Email: info@rowsandall.com
- The company is registered in the business register at the
- Regional Court in Brno (Společnost je zapsána v obchodním rejstříku vedeném u Krajského soudu v Brně, oddíl C, vložka 105845)
-