from django.http import HttpResponse
from django.shortcuts import render
# Forms
def search_form(request):
return render(request, 'x1.html')
# Receive request data
def search(request):
request.encoding = 'utf-8'
if 'q' in request.GET and request.GET['q']:
message = ' What you search for is : ' + request.GET['q']
else:
message = ' You submitted an empty form '
return HttpResponse(message)