parameters: (context, obj)
return_statement: return template.render(ctx)
docstring: Creates comment area for given object to be used later by scripts.
docstring_summary: Creates comment area for given object to be used later by scripts.
docstring_tokens: Creates comment area for given object to be used later by scripts .
function: def commentarea(context, obj):
      """ Creates comment area for given object to be used later by scripts.
  	"""
      ct = ContentType.objects.get_for_model(obj).pk
      template = loader.get_template('comments/commentarea.html')
      qs = CustomComment.objects.filter(content_type_id=ct,
                      object_pk=obj.pk).order_by('-submit_date')
      comments = qs.filter(parent__isnull=True)[:get_config('PAGINATE_BY')]
      data = {
          'has_next': len(qs) > get_config('PAGINATE_BY'),
          'results': CommentDetailSerializer(comments, many=True,
                                                       context=context).data, }
      ctx = Context({
          'user': context['user'],
          'ct': ct,
          'pk': obj.pk,
          'ab': ContentType.objects.get_for_model(CustomComment).pk,
          'count': len(qs),
          'comments': qs,
          'first_page': JSONRenderer().render(data),
      })
      return template.render(ctx)
function_tokens: def commentarea ( context , obj ) : ct = ContentType . objects . get_for_model ( obj ) . pk template = loader . get_template ( 'comments/commentarea.html' ) qs = CustomComment . objects . filter ( content_type_id = ct , object_pk = obj . pk ) . order_by ( '-submit_date' ) comments = qs . filter ( parent__isnull = True ) [ : get_config ( 'PAGINATE_BY' ) ] data = { 'has_next' : len ( qs ) > get_config ( 'PAGINATE_BY' ) , 'results' : CommentDetailSerializer ( comments , many = True , context = context ) . data , } ctx = Context ( { 'user' : context [ 'user' ] , 'ct' : ct , 'pk' : obj . pk , 'ab' : ContentType . objects . get_for_model ( CustomComment ) . pk , 'count' : len ( qs ) , 'comments' : qs , 'first_page' : JSONRenderer ( ) . render ( data ) , } ) return template . render ( ctx )