예제 #1
0
 def get_serializer_class(self):
     model_type = self.request.GET.get("type", "post")
     id = self.request.GET.get("id")
     parent_id = self.request.GET.get("parent_id")
     return create_comment_serializer(model_type=model_type,
                                      id=id,
                                      parent_id=parent_id)
예제 #2
0
 def get_serializer_class(self):
     model_type = self.request.GET.get("type")
     slug = self.request.GET.get("slug")
     parent_id = self.request.GET.get("parent_id", None)
     return create_comment_serializer(model_type=model_type,
                                      slug=slug,
                                      parent_id=parent_id,
                                      user=self.request.user)
예제 #3
0
 def get_serializer_class(self):
     model_type = self.request.GET.get('type')
     slug = self.request.GET.get("slug")
     parent_id = self.request.GET.get("parent_id", None)
     return create_comment_serializer(
             model_type=model_type,
             slug=slug,
             parent_id=parent_id,
             user=self.request.user,
     )
예제 #4
0
	def get_serializer_class (self):
		model_type = self.request.GET.get("type")
		id = self.request.GET.get('id')
		parent_id = self.request.GET.get("parent_id", None)
		return create_comment_serializer(
			model_type=model_type,
			id=id, 
			parent_id=parent_id,
			user = self.request.user,
			)
예제 #5
0
    def get_serializer_class(self, *args, **kwargs):
        model_type = self.request.GET.get('type')
        slug = self.request.GET.get('slug')
        parent_id = self.request.GET.get('parent_id', None)

        return create_comment_serializer(
            model_type=model_type,
            slug=slug,
            parent_id=parent_id,
            user=self.request.user,
        )