Skip to content
Snippets Groups Projects
Commit ffb90e20 authored by Johannes Raggam's avatar Johannes Raggam
Browse files

create form from request only if there are any GET parameters

parent b0fc7daa
No related branches found
No related tags found
No related merge requests found
......@@ -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']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment