From b0fc7daaaede72ceb38c00115b0a79fb600137d7 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Wed, 1 Jun 2011 12:21:17 +0200 Subject: use GET instead of POST, since it simply works with deliverance diff --git a/nop/site_media/nowplaying_form.js b/nop/site_media/nowplaying_form.js index 86656d5..ce3d2aa 100644 --- a/nop/site_media/nowplaying_form.js +++ b/nop/site_media/nowplaying_form.js @@ -1,9 +1,9 @@ -$(document).ready(function() { - $("#nop_date").dateinput({ +jQuery(document).ready(function() { + jQuery("#nop_date").dateinput({ format: 'yyyy-mm-dd', firstDay: 1 }); - $("#nop_time").AnyTime_picker({ + jQuery("#nop_time").AnyTime_picker({ format: "%H:%i", labelTitle: "Zeit", labelHour: "Stunde", diff --git a/nop/templates/nop_form.html b/nop/templates/nop_form.html index 98b000d..e3b32e9 100644 --- a/nop/templates/nop_form.html +++ b/nop/templates/nop_form.html @@ -12,7 +12,7 @@
-
{% csrf_token %} + {{ form.as_table }}
diff --git a/nop/views.py b/nop/views.py index 6a88607..712be84 100644 --- a/nop/views.py +++ b/nop/views.py @@ -118,11 +118,12 @@ def get(request, year=None, month=None, day=None, hour=None, minute=None): def nop_form(request): context = {} - context.update(csrf(request)) + # currently no csrf security for nicier forms + #context.update(csrf(request)) # in django template: {% csrf_token %} date = None time = None - if request.method == 'POST': - form = NopForm(request.POST) + if request.method == 'GET': + form = NopForm(request.GET) if form.is_valid(): date = form.cleaned_data['date'] time = form.cleaned_data['time'] -- cgit v0.10.2