Пример #1
0
 def get(self, request,format = None):
     anonymousvisitorvviewers = AnonymousVisitorViewer.objects.all()
     
     if request.user.is_authenticated() and request.user.user_profile.segment != None:
         anonymousvisitorvviewers = []
     
     serialized_anonymousvisitorvviewers =AnonymousVisitorViewerSerializer(get_accessed_list( anonymousvisitorvviewers, request.user), many = True)
     return Response(serialized_anonymousvisitorvviewers.data)
Пример #2
0
 def get(self, request,format = None):
     glimpses = Glimpse.objects.all()
     
     if request.user.is_authenticated() and request.user.user_profile.segment != None:
         glimpses = []
     
     
     serialized_glimpses =GlimpseSerializer(get_accessed_list( glimpses, request.user), many = True)
     return Response(serialized_glimpses.data)
Пример #3
0
    def get(self, request, format=None):
        anonymousvisitors = AnonymousVisitor.objects.all()

        if request.user.is_authenticated(
        ) and request.user.user_profile.segment != None:
            anonymousvisitors = []

        serialized_anonymousvisitor = AnonymousVisitorSerializer(
            get_accessed_list(anonymousvisitors, request.user), many=True)
        return Response(serialized_anonymousvisitor.data)
Пример #4
0
 def get(self, request,format = None):
     not_missed_tasks = []
     tasks = Task.objects.all()
     for task in tasks:
         status =  task_get_status( task)
         if status != Task.MISSED and can_user_acess_discussion(task.parent, request.user):
             not_missed_tasks.append(task)
     
     serialized_tasks =TaskSerializer(get_accessed_list( not_missed_tasks, request.user), many = True)
     return Response(serialized_tasks.data)
Пример #5
0
    def get(self, request, format=None):
        glimpses = Glimpse.objects.all()

        if request.user.is_authenticated(
        ) and request.user.user_profile.segment != None:
            glimpses = []

        serialized_glimpses = GlimpseSerializer(get_accessed_list(
            glimpses, request.user),
                                                many=True)
        return Response(serialized_glimpses.data)
Пример #6
0
    def get(self, request, format=None):
        not_missed_tasks = []
        tasks = Task.objects.all()
        for task in tasks:
            status = task_get_status(task)
            if status != Task.MISSED and can_user_acess_discussion(
                    task.parent, request.user):
                not_missed_tasks.append(task)

        serialized_tasks = TaskSerializer(get_accessed_list(
            not_missed_tasks, request.user),
                                          many=True)
        return Response(serialized_tasks.data)
Пример #7
0
    def get(self, request, format=None):

        serialized_feedbacks = FeedbackSerializer(get_accessed_list(
            Feedback.objects.all(), request.user),
                                                  many=True)
        return Response(serialized_feedbacks.data)
Пример #8
0
    def get(self, request, format=None):

        serialized_discussions = DiscussionSerializer(get_accessed_list(
            Discussion.objects.all(), request.user),
                                                      many=True)
        return Response(serialized_discussions.data)
Пример #9
0
    def get(self, request, format=None):

        serialized_viewers = ViewerSerializer(get_accessed_list(
            Viewer.objects.all(), request.user),
                                              many=True)
        return Response(serialized_viewers.data)
Пример #10
0
 def get(self, request,format = None):
     
     serialized_feedbacks =FeedbackSerializer(get_accessed_list( Feedback.objects.all(), request.user), many = True)
     return Response(serialized_feedbacks.data)
Пример #11
0
 def get(self, request,format = None):
     
     serialized_discussions = DiscussionSerializer(get_accessed_list( Discussion.objects.all(), request.user), many = True)
     return Response(serialized_discussions.data)
Пример #12
0
    def get(self, request,format = None):

        serialized_viewers =ViewerSerializer(get_accessed_list( Viewer.objects.all(), request.user), many = True)
        return Response(serialized_viewers.data)