Пример #1
0
 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)
Пример #2
0
	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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
	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)
Пример #6
0
 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)
Пример #7
0
	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)
Пример #8
0
 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)
Пример #9
0
	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)
Пример #10
0
	def list(self, request):
		pv = PageView(page="User")
		pv.save()
		return Response(SkvallraUserSerializer(SkvallraUser.objects.all(), many=True).data)
Пример #11
0
 def retrieve(self, request, pk=None):
     pv = PageView(page="UserAction")
     pv.save()
     return Response(
         UserActionSerializer(UserAction.objects.get(pk=pk)).data)
Пример #12
0
	def retrieve(self, request, pk=None):
		pv = PageView(page="UserAction")
		pv.save()
		return Response(UserActionSerializer(UserAction.objects.get(pk=pk)).data)
Пример #13
0
 def list(self, request):
     pv = PageView(page="Setting")
     pv.save()
     return Response(
         SettingSerializer(Setting.objects.all(), many=True).data)
Пример #14
0
	def retrieve(self, request, pk=None):
		pv = PageView(page="Comment")
		pv.save()
		return Response(CommentSerializer(Comment.objects.get(pk=pk)).data)
Пример #15
0
 def list(self, request):
     pv = PageView(page="Image")
     pv.save()
     return Response(ImageSerializer(Image.objects.all(), many=True).data)
Пример #16
0
	def list(self, request):
		pv = PageView(page="Comment")
		pv.save()
		return Response(CommentSerializer(Comment.objects.all(), many=True).data)
Пример #17
0
	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)
Пример #18
0
	def retrieve(self, request, pk=None):
		pv = PageView(page="Setting")
		pv.save()
		return Response(SettingSerializer(Setting.objects.get(pk=pk)).data)
Пример #19
0
	def retrieve(self, request, pk=None):
		pv = PageView(page="Image")
		pv.save()
		return Response(ImageSerializer(Image.objects.get(pk=pk)).data)
Пример #20
0
	def list(self, request):
		pv = PageView(page="Image")
		pv.save()
		return Response(ImageSerializer(Image.objects.all(), many=True).data)
Пример #21
0
 def retrieve(self, request, pk=None):
     pv = PageView(page="Image")
     pv.save()
     return Response(ImageSerializer(Image.objects.get(pk=pk)).data)
Пример #22
0
	def retrieve(self, request, pk=None):
		pv = PageView(page="User")
		pv.save()
		return Response(SkvallraUserSerializer(SkvallraUser.objects.get(pk=pk)).data)
Пример #23
0
 def retrieve(self, request, pk=None):
     pv = PageView(page="Setting")
     pv.save()
     return Response(SettingSerializer(Setting.objects.get(pk=pk)).data)
Пример #24
0
 def retrieve(self, request, pk=None):
     pv = PageView(page="Comment")
     pv.save()
     return Response(CommentSerializer(Comment.objects.get(pk=pk)).data)
Пример #25
0
 def list(self, request):
     pv = PageView(page="Comment")
     pv.save()
     return Response(
         CommentSerializer(Comment.objects.all(), many=True).data)
Пример #26
0
 def retrieve(self, request, pk=None):
     pv = PageView(page="User")
     pv.save()
     return Response(
         SkvallraUserSerializer(SkvallraUser.objects.get(pk=pk)).data)
Пример #27
0
 def list(self, request):
     pv = PageView(page="User")
     pv.save()
     return Response(
         SkvallraUserSerializer(SkvallraUser.objects.all(), many=True).data)
Пример #28
0
	def list(self, request):
		pv = PageView(page="Tag")
		pv.save()
		return Response(TagSerializer(Tag.objects.all(), many=True).data)
Пример #29
0
 def list(self, request):
     pv = PageView(page="UserAction")
     pv.save()
     return Response(
         UserActionSerializer(UserAction.objects.all(), many=True).data)
Пример #30
0
	def list(self, request):
		pv = PageView(page="UserAction")
		pv.save()
		return Response(UserActionSerializer(UserAction.objects.all(), many=True).data)