diff options
author | Johannes Raggam <raggam-nl@adm.at> | 2011-06-01 10:39:09 (GMT) |
---|---|---|
committer | Johannes Raggam <raggam-nl@adm.at> | 2011-06-01 10:39:09 (GMT) |
commit | ffb90e206cebf75b159a3e42a7f5f86287fbabc0 (patch) | |
tree | 0d57b67ba1a357f04d6c923beb01883b054bc8e0 /nop | |
parent | b0fc7daaaede72ceb38c00115b0a79fb600137d7 (diff) |
create form from request only if there are any GET parameters
Diffstat (limited to 'nop')
-rw-r--r-- | nop/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nop/views.py b/nop/views.py index 712be84..4b43975 100644 --- a/nop/views.py +++ b/nop/views.py @@ -122,7 +122,8 @@ def nop_form(request): #context.update(csrf(request)) # in django template: {% csrf_token %} date = None time = None - if request.method == 'GET': + if request.method == 'GET' and\ + ('date' in request.GET or 'time' in request.GET): form = NopForm(request.GET) if form.is_valid(): date = form.cleaned_data['date'] |