nice, the fix for your views code like this:
return HttpResponse( template.render({}, request))
but using render shortcut is simpler
you can read the different here https://stackoverflow.com/a/7303168/3925477
no need, you can try this
def index(request):
if request.method == 'GET':
query = request.GET.get('query')
return render(request, 'application/index.html',{'data':query})
return render(request, 'application/index.html')
no, put the endif right after {{ query }}
else your form gonna be gone if query value is none
inchidi
if you already know how to show passed value from views
then your next task is show value from this url
https://api.github.com/search/repositories?per_page=5&sort=created&q=men
inchidi
but the q param value is user input (query) and not men
okay, so the next is you need to parse the JSON data from https://api.github.com/search/repositories?per_page=5&sort=created&q=men and send it as response to user