def retrieve(self, request, pk=None): pv = PageView(page="ActionComment") pv.save() comments = Comment.objects.filter( action_id=pk).order_by('-comment_time') serializer = CommentSerializer(comments, many=True) return Response(serializer.data)
def retrieve(self, request, pk=None): user = request.user if not user.is_anonymous(): pv = PageView(page="Profile") pv.save() serializer = SkvallraUserSerializer(user) return Response(serializer.data) return Response(status=401)
def retrieve(self, request, pk=None): pv = PageView(page="Action_User") pv.save() temp = UserAction.objects.filter(action_id=pk) users = [] for t in temp: users.append(SkvallraUser.objects.get(pk=t.user_id)) serializer = SkvallraUserSerializer(users, many=True) return Response(serializer.data)
def retrieve(self, request, pk=None): pv = PageView(page="User_Action") pv.save() temp = UserAction.objects.filter(user_id=pk) actions = [] for t in temp: actions.append(Action.objects.get(pk=t.action_id)) serializer = ActionSerializer(actions, many=True) return Response(serializer.data)
def list(self, request): pv = PageView(page="User_Action") pv.save() user = request.user temp = UserAction.objects.filter(user_id=user.id) actions = [] for t in temp: actions.append(Action.objects.get(pk=t.action_id)) serializer = ActionSerializer(actions, many=True) return Response(serializer.data)
def list(self, request): pv = PageView(page="User") pv.save() return Response(SkvallraUserSerializer(SkvallraUser.objects.all(), many=True).data)
def retrieve(self, request, pk=None): pv = PageView(page="UserAction") pv.save() return Response( UserActionSerializer(UserAction.objects.get(pk=pk)).data)
def retrieve(self, request, pk=None): pv = PageView(page="UserAction") pv.save() return Response(UserActionSerializer(UserAction.objects.get(pk=pk)).data)
def list(self, request): pv = PageView(page="Setting") pv.save() return Response( SettingSerializer(Setting.objects.all(), many=True).data)
def retrieve(self, request, pk=None): pv = PageView(page="Comment") pv.save() return Response(CommentSerializer(Comment.objects.get(pk=pk)).data)
def list(self, request): pv = PageView(page="Image") pv.save() return Response(ImageSerializer(Image.objects.all(), many=True).data)
def list(self, request): pv = PageView(page="Comment") pv.save() return Response(CommentSerializer(Comment.objects.all(), many=True).data)
def retrieve(self, request, pk=None): pv = PageView(page="ActionComment") pv.save() comments = Comment.objects.filter(action_id=pk).order_by('-comment_time') serializer = CommentSerializer(comments, many=True) return Response(serializer.data)
def retrieve(self, request, pk=None): pv = PageView(page="Setting") pv.save() return Response(SettingSerializer(Setting.objects.get(pk=pk)).data)
def retrieve(self, request, pk=None): pv = PageView(page="Image") pv.save() return Response(ImageSerializer(Image.objects.get(pk=pk)).data)
def retrieve(self, request, pk=None): pv = PageView(page="User") pv.save() return Response(SkvallraUserSerializer(SkvallraUser.objects.get(pk=pk)).data)
def list(self, request): pv = PageView(page="Comment") pv.save() return Response( CommentSerializer(Comment.objects.all(), many=True).data)
def retrieve(self, request, pk=None): pv = PageView(page="User") pv.save() return Response( SkvallraUserSerializer(SkvallraUser.objects.get(pk=pk)).data)
def list(self, request): pv = PageView(page="User") pv.save() return Response( SkvallraUserSerializer(SkvallraUser.objects.all(), many=True).data)
def list(self, request): pv = PageView(page="Tag") pv.save() return Response(TagSerializer(Tag.objects.all(), many=True).data)
def list(self, request): pv = PageView(page="UserAction") pv.save() return Response( UserActionSerializer(UserAction.objects.all(), many=True).data)
def list(self, request): pv = PageView(page="UserAction") pv.save() return Response(UserActionSerializer(UserAction.objects.all(), many=True).data)