Private
Public Access
1
0

adding names of athlete to alert pages

This commit is contained in:
Sander Roosendaal
2019-08-19 21:53:39 +02:00
parent eaf144503e
commit 6998ab9306
4 changed files with 7 additions and 4 deletions

View File

@@ -1072,10 +1072,12 @@ class Alert(models.Model):
def __str__(self):
stri = u'Alert {name} on {metric} for {workouttype}'.format(
stri = u'Alert {name} on {metric} for {workouttype} - running on {first_name} every {period} days'.format(
name = self.name,
metric = self.measured.metric,
workouttype = self.workouttype
workouttype = self.workouttype,
first_name = self.rower.user.first_name,
period = self.period,
)
return stri

View File

@@ -30,7 +30,7 @@
<form action="" method="post">
<ul class="main-content">
<li class="grid_2">
<h2>Alert</h2>
<h2>New Alert for {{ rower.user.first_name }}</h2>
<p>
{{ formset.management_form }}
{% csrf_token %}

View File

@@ -28,7 +28,7 @@
<form action="" method="post">
<ul class="main-content">
<li class="grid_2">
<h2>Alert</h2>
<h2>Alert {{ alert.name }} for {{ alert.rower.user.first_name }}</h2>
<p>
{{ formset.management_form }}
{% csrf_token %}

View File

@@ -4577,6 +4577,7 @@ def alert_edit_view(request,id=0,userid=0):
'form':form,
'measuredform':measuredform,
'formset':filter_formset,
'alert':alert,
})
# alert delete view