Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def add_tag(request):
- if request.method == 'GET':
- html = html_template.format(where = request.path)
- resp = HttpResponse(html)
- return resp
- elif request.method == 'POST':
- article_id = int(request.POST['id'])
- new_tag = request.POST['new_tag']
- for article in articles_list:
- if article[0] == article_id:
- article[4].append(new_tag)
- return article_by_id(request, article_id)
Add Comment
Please, Sign In to add comment