Private
Public Access
1
0

target unicode representation and target selection

This commit is contained in:
Sander Roosendaal
2018-10-31 11:49:23 +01:00
parent 3d06bf5ad1
commit b4255c4e2a
2 changed files with 5 additions and 2 deletions

View File

@@ -953,7 +953,7 @@ class TrainingTarget(models.Model):
ownerfirst = ''
ownerlast = ''
stri = u'{id} {n} {d} {ownerfirst} {ownerlast}'.format(
stri = u'#{id}: {n} {d} {ownerfirst} {ownerlast}'.format(
ownerfirst = ownerfirst,
ownerlast = ownerlast,
d = date.strftime('%Y-%m-%d'),

View File

@@ -16188,7 +16188,10 @@ def rower_create_trainingplan(request,userid=0):
p.rowers.add(therower)
targets = TrainingTarget.objects.filter(rowers=therower).order_by("date")
targets = TrainingTarget.objects.filter(
rowers=therower,
date__gte=datetime.date.today(),
).order_by("date")
targetform = TrainingTargetForm()
plans = TrainingPlan.objects.filter(rowers=therower).order_by("-startdate")