parameters: (self, request, **kwargs)
return_statement: return Response(serializer.data)
docstring: POST - publish xlsform file to a specific project.
  
          xls_file -- xlsform file object
docstring_summary: POST - publish xlsform file to a specific project.
docstring_tokens: POST - publish xlsform file to a specific project .
function: def forms(self, request, **kwargs):
          """
          POST - publish xlsform file to a specific project.
  
          xls_file -- xlsform file object
          """
          project = get_object_or_404(
              Project, pk=kwargs.get('pk', None),
              organization__username=kwargs.get('owner', None))
          if request.method.upper() == 'POST':
              survey = utils.publish_project_xform(request, project)
              if isinstance(survey, XForm):
                  xform = XForm.objects.get(pk=survey.pk)
                  serializer = api_serializers.XFormSerializer(
                      xform, context={'request': request})
                  return Response(serializer.data, status=201)
              return Response(survey, status=400)
          filter = {'project': project}
          many = True
          if 'formid' in kwargs:
              many = False
              filter['xform__pk'] = int(kwargs.get('formid'))
          if many:
              qs = ProjectXForm.objects.filter(**filter)
              data = [px.xform for px in qs]
          else:
              qs = get_object_or_404(ProjectXForm, **filter)
              data = qs.xform
          serializer = api_serializers.XFormSerializer(
              data, many=many, context={'request': request})
          return Response(serializer.data)
function_tokens: def forms ( self , request , * * kwargs ) : project = get_object_or_404 ( Project , pk = kwargs . get ( 'pk' , None ) , organization__username = kwargs . get ( 'owner' , None ) ) if request . method . upper ( ) == 'POST' : survey = utils . publish_project_xform ( request , project ) if isinstance ( survey , XForm ) : xform = XForm . objects . get ( pk = survey . pk ) serializer = api_serializers . XFormSerializer ( xform , context = { 'request' : request } ) return Response ( serializer . data , status = 201 ) return Response ( survey , status = 400 ) filter = { 'project' : project } many = True if 'formid' in kwargs : many = False filter [ 'xform__pk' ] = int ( kwargs . get ( 'formid' ) ) if many : qs = ProjectXForm . objects . filter ( * * filter ) data = [ px . xform for px in qs ] else : qs = get_object_or_404 ( ProjectXForm , * * filter ) data = qs . xform serializer = api_serializers . XFormSerializer ( data , many = many , context = { 'request' : request } ) return Response ( serializer . data )