Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def search(request):
- if request.method == 'GET':
- name = request.GET['name']
- year = int(request.GET['year'])
- found_articles = []
- for article in articles_list:
- if article[1] == name and article[2] == year:
- found_articles.append(article)
- beautiful_html = generate_html(found_articles)
- return HttpResponse(beautiful_html)
Add Comment
Please, Sign In to add comment