def comment_was_posted(request):
 obj = None
 if request.GET.has_key('c'):
  (content_type_id, object_id) = request.GET['c'].split(':')
  try:
   content_type = ContentType.objects.get(pk=content_type_id)
   obj = content_type.get_object_for_this_type(pk=object_id)
  except ObjectDoesNotExist:
   pass
 return render_to_response('comments/posted.html', {'object': obj}, context_instance=RequestContext(request))

def comment_was_posted ( request ) : obj = None if request . GET . has_key ( 'c' ) : ( content_type_id , object_id ) = request . GET [ 'c' ] . split ( ':' ) try : content_type = ContentType . objects . get ( pk = content_type_id ) obj = content_type . get_object_for_this_type ( pk = object_id ) except ObjectDoesNotExist : pass return render_to_response ( 'comments/posted.html' , { 'object' : obj } , context_instance = RequestContext ( request ) )
display "comment was posted" success page templates: comment_posted context: object the object the comment was posted on .