parameters: (request, slug)
return_statement: return HttpResponseRedirect(request.META['HTTP_REFERER'] + '#reply-' + str(entry.pk))
docstring: Create forum reply.
docstring_summary: Create forum reply.
docstring_tokens: Create forum reply .
function: def reply(request, slug):
      """ Create forum reply. """
      if request.method == 'POST' and request.POST:
          post = request.POST
          topic = Discussion.objects.get(slug=post['discussion'])
          if not topic.status:
              return HttpResponse(_('This discussion is closed.'))
          entry = Entry(
              content = post['content'],
              creator = request.user,
              discussion = topic,
          )
          
          entry.save()
          action.send(
              request.user,
              action_object=entry,
              target = topic,
              verb= _('posted')
          )
          
      return HttpResponseRedirect(request.META['HTTP_REFERER'] + '#reply-' + str(entry.pk))
function_tokens: def reply ( request , slug ) : if request . method == 'POST' and request . POST : post = request . POST topic = Discussion . objects . get ( slug = post [ 'discussion' ] ) if not topic . status : return HttpResponse ( _ ( 'This discussion is closed.' ) ) entry = Entry ( content = post [ 'content' ] , creator = request . user , discussion = topic , ) entry . save ( ) action . send ( request . user , action_object = entry , target = topic , verb = _ ( 'posted' ) ) return HttpResponseRedirect ( request . META [ 'HTTP_REFERER' ] + '#reply-' + str ( entry . pk ) )