fine tuning
This commit is contained in:
@@ -797,7 +797,7 @@ class PlannedSession(models.Model):
|
||||
)
|
||||
|
||||
criteriumchoices = (
|
||||
('none','None'),
|
||||
('none','Approximately'),
|
||||
('minimum','At Least'),
|
||||
('exact','Exactly'),
|
||||
)
|
||||
@@ -879,6 +879,9 @@ class PlannedSession(models.Model):
|
||||
|
||||
return stri
|
||||
|
||||
# Date input utility
|
||||
class DateInput(forms.DateInput):
|
||||
input_type = 'date'
|
||||
|
||||
class PlannedSessionForm(ModelForm):
|
||||
class Meta:
|
||||
@@ -888,19 +891,16 @@ class PlannedSessionForm(ModelForm):
|
||||
'name',
|
||||
'sessiontype',
|
||||
'sessionmode',
|
||||
'criterium',
|
||||
'sessionvalue',
|
||||
'sessionunit',
|
||||
'comment',
|
||||
]
|
||||
widgets = {
|
||||
'comment': forms.Textarea,
|
||||
'startdate': SelectDateWidget(
|
||||
years=range(
|
||||
timezone.now().year-1,timezone.now().year+2)),
|
||||
'enddate': SelectDateWidget(
|
||||
years=range(
|
||||
timezone.now().year-1,timezone.now().year+2)),
|
||||
}
|
||||
'startdate': DateInput(),
|
||||
'enddate': DateInput(),
|
||||
}
|
||||
|
||||
|
||||
# Workout
|
||||
@@ -1140,9 +1140,6 @@ def auto_delete_image_on_delete(sender,instance, **kwargs):
|
||||
else:
|
||||
print "couldn't find the file "+instance.filename
|
||||
|
||||
# Date input utility
|
||||
class DateInput(forms.DateInput):
|
||||
input_type = 'date'
|
||||
|
||||
# Form to update Workout data
|
||||
class WorkoutForm(ModelForm):
|
||||
|
||||
Reference in New Issue
Block a user