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