in my javascript file, I have a function
function saveMyData(event, dayDelta, minuteDelta) {
montitre = event.title;
mondepart = event.start;
mafin = event.end;`
$.getJSON("{% url events_drag %}", {'title': montitre, 'start': mondepart,
'end': mafin}, function(data) {
});
}
if i put a message alert inside the function
alert(mafin);
I display :
Tue Aug 04 2015 16:00:00 GMT+0200
I want to send mafin
to a python function with getJSON
and read mafin
with this code :
def eventsdrag(request):
end = float(request.GET.get('end'))
end = datetime.datetime.fromtimestamp(end)
How to convert 'Tue Aug 04 2015 16:00:00 GMT+0200'
in a number and read this number with request.GET.get
?