sds
This commit is contained in:
@@ -1297,7 +1297,6 @@ def new_workout_from_file(r, f2,
|
||||
makeprivate=False,
|
||||
notes=''):
|
||||
message = None
|
||||
print('noot',notes)
|
||||
try:
|
||||
fileformat = get_file_type(f2)
|
||||
except (IOError,UnicodeDecodeError):
|
||||
|
||||
@@ -163,7 +163,7 @@ class DocumentsForm(forms.Form):
|
||||
label = "Boat Type")
|
||||
|
||||
|
||||
notes = forms.CharField(initial='these are notes',required=False,
|
||||
notes = forms.CharField(required=False,
|
||||
widget=forms.Textarea)
|
||||
|
||||
offline = forms.BooleanField(initial=False,required=False,
|
||||
|
||||
@@ -39,7 +39,9 @@
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input class="button green" type="submit" value="Submit">
|
||||
<p>
|
||||
<input type="submit" value="Submit">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</li>
|
||||
@@ -201,9 +203,15 @@ $('#id_workouttype').change();
|
||||
if ($(this).attr('id') == 'id_file') {
|
||||
data.set("file",this.files[0]);
|
||||
}
|
||||
console.log($(this).attr('name'),$(this).val());
|
||||
console.log($(this).attr('id'),$(this).attr('name'),$(this).val());
|
||||
};
|
||||
});});
|
||||
});});
|
||||
|
||||
$('textarea').each(function( i ) {
|
||||
$(this).change(function() {
|
||||
data.set($(this).attr('name'),$(this).val());
|
||||
console.log($(this).attr('id'),$(this).attr('name'),$(this).val());
|
||||
});});
|
||||
|
||||
$('select').each(function( i ) {
|
||||
console.log($(this).attr('name'),$(this).val());
|
||||
@@ -213,7 +221,7 @@ $('#id_workouttype').change();
|
||||
});
|
||||
});
|
||||
|
||||
frm.submit(function() {
|
||||
frm.submit(function() {
|
||||
console.log("Form submission");
|
||||
$(data.values()).each(function(value) {
|
||||
console.log(value);
|
||||
|
||||
@@ -111,7 +111,6 @@ def response_error_handler(request, exception=None):
|
||||
return HttpResponse('Error handler content', status=403)
|
||||
|
||||
def filenotfound_handler(request, exception=None):
|
||||
print('noot')
|
||||
return HttpResponse('Error handler content', status=404)
|
||||
|
||||
handler403 = views.error403_view
|
||||
|
||||
@@ -3900,6 +3900,11 @@ def workout_upload_view(request,
|
||||
except KeyError:
|
||||
boattype = '1x'
|
||||
|
||||
try:
|
||||
notes = docformoptions['notes']
|
||||
except KeyError:
|
||||
notes = ''
|
||||
|
||||
try:
|
||||
workoutsource = uploadoptions['workoutsource']
|
||||
except KeyError:
|
||||
@@ -3981,8 +3986,6 @@ def workout_upload_view(request,
|
||||
notes = form.cleaned_data['notes']
|
||||
offline = form.cleaned_data['offline']
|
||||
|
||||
print('aap',form.cleaned_data)
|
||||
|
||||
race = None
|
||||
if optionsform.is_valid():
|
||||
make_plot = optionsform.cleaned_data['make_plot']
|
||||
@@ -4023,7 +4026,6 @@ def workout_upload_view(request,
|
||||
f2 = res[1] # file name incl media directory
|
||||
|
||||
if not offline:
|
||||
print('noot',notes)
|
||||
id,message,f2 = dataprep.new_workout_from_file(
|
||||
r,f2,
|
||||
workouttype=workouttype,
|
||||
|
||||
Reference in New Issue
Block a user