brew_journal/recipies/views.py
def list(self, request):
        """
        List all of a user's recipes. Only return the ID and the name.
        While this may seem initially uneeded, as the number of recipes
        grows limiting data will be important.
        """

        if not request.user.is_active:
            return Response({
                'status'  : 'UNAUTHORIZED',
                'message' : 'Requesting user is no longer active.',
            }, status=status.HTTP_401_UNAUTHORIZED);

        queryset = Recipe.objects.filter(account=request.user)

        serializer = RecipeSerializer(queryset, many=True)

        retData = [dict(id=x.get('id'),name=x.get('recipe_name')) for x in serializer.data]

        if len(retData) == 0:
            return Response({},status=status.HTTP_204_NO_CONTENT)
        else:
            return Response(retData)

        List all of a user's recipes. Only return the ID and the name.
        While this may seem initially uneeded, as the number of recipes
        grows limiting data will be important.
        
List all of a user's recipes. Only return the ID and the name.
While this may seem initially uneeded, as the number of recipes
grows limiting data will be important.
List all of a user ' s recipes . Only return the ID and the name . While this may seem initially uneeded as the number of recipes grows limiting data will be important .
def list(self, request):
        if not request.user.is_active:
            return Response({
                'status'  : 'UNAUTHORIZED',
                'message' : 'Requesting user is no longer active.',
            }, status=status.HTTP_401_UNAUTHORIZED);
        queryset = Recipe.objects.filter(account=request.user)
        serializer = RecipeSerializer(queryset, many=True)
        retData = [dict(id=x.get('id'),name=x.get('recipe_name')) for x in serializer.data]
        if len(retData) == 0:
            return Response({},status=status.HTTP_204_NO_CONTENT)
        else:
            return Response(retData)
def list ( self , request ) : if not request . user . is_active : return Response ( { 'status' : 'UNAUTHORIZED' , 'message' : 'Requesting user is no longer active.' , } , status = status . HTTP_401_UNAUTHORIZED ) ; queryset = Recipe . objects . filter ( account = request . user ) serializer = RecipeSerializer ( queryset , many = True ) retData = [ dict ( id = x . get ( 'id' ) , name = x . get ( 'recipe_name' ) ) for x in serializer . data ] if len ( retData ) == 0 : return Response ( { } , status = status . HTTP_204_NO_CONTENT ) else : return Response ( retData )
List all of a user's recipes.
List all of a user ' s recipes .
"""
        List all of a user's recipes. Only return the ID and the name.
        While this may seem initially uneeded, as the number of recipes
        grows limiting data will be important.
        """
self
request