~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlsearch/views.py

  • Committer: franku
  • Date: 2019-05-26 07:57:30 UTC
  • Revision ID: somal@arcor.de-20190526075730-irq16gqqclz3yuvi
fixed server errors regarding search due to other request types

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        form = WlSearchForm()
51
51
        return render(request, 'search/search.html', {'form': form})
52
52
    
53
 
    elif request.method == 'GET':
 
53
    else:  # request.GET or other requests
54
54
        form = WlSearchForm(request.GET)
55
55
        if form.is_valid() and form.cleaned_data['q'] != '':
56
56
            context = {'form': form,