diff options
author | Johannes Raggam <raggam-nl@adm.at> | 2011-06-01 10:21:17 (GMT) |
---|---|---|
committer | Johannes Raggam <raggam-nl@adm.at> | 2011-06-01 10:21:17 (GMT) |
commit | b0fc7daaaede72ceb38c00115b0a79fb600137d7 (patch) | |
tree | 41ab6bc25d244a5566139ce10e6cfc8dabfd112e | |
parent | 533da937fc41513ec25f8e64294b135e42a24ceb (diff) |
use GET instead of POST, since it simply works with deliverance
-rw-r--r-- | nop/site_media/nowplaying_form.js | 6 | ||||
-rw-r--r-- | nop/templates/nop_form.html | 2 | ||||
-rw-r--r-- | nop/views.py | 7 |
3 files changed, 8 insertions, 7 deletions
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 @@ <body> <div id="content-main" class="show-detail"> - <form action="" method="post">{% csrf_token %} + <form action="/nop" method="get"> {{ form.as_table }} <input type="submit" value="senden" /> </form> 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'] |