def list(self, request): message = '' data = [] walls = get_my_walls(request.user) if not walls: message = 'no walls to be displayed' return Response(viewset_response(message, data)) wallserializer = WallSerializer(walls, many=True) data = wallserializer.data return Response(viewset_response(message, data))
def list(self,request): message='' data=[] walls = get_my_walls(request.user) if not walls : message='no walls to be displayed' return Response(viewset_response(message,data)) wallserializer=WallSerializer(walls,many=True) data=wallserializer.data return Response(viewset_response(message,data))
def related_walls(self): from apps.walls.utils import get_my_walls return get_my_walls(self)