Example #1
0
    class Meta:
        queryset = models.Face.objects.filter(removed=False)
        max_limit = 1000
        list_allowed_methods = ['get', 'post']
        detail_allowed_methods = ['get', 'put', 'delete']
        always_return_data = True
        filtering = {
            "id": ["gt", "gte", "lt", "lte"],
            "accepted": ["exact"],
            "views": ["gt", "gte", "lt", "lte"],
            "hotness": ["gt", "gte", "lt", "lte"],
            "tags": ["all", "any"]
        }

        ordering = ["id", "random", "views", "hotness"]
        excludes = [
            "gif", "png", "jpg", "webp", "small", "medium", "large", "huge",
            "removed"
        ]
        readonlys = [
            "views", "md5", "accepted", "comment", "added", "height", "width",
            "hotness", "processed"
        ]
        authorization = auths.AnonMethodAllowed().set_allowed(
            ["GET", "POST", "PUT", "PATCH"])
        validation = FaceValidation()
        description = """Resource that contains all the reaction images in \
Example #2
0
 class Meta:
     queryset = models.Flag.objects.all()
     include_resource_uri = False
     ordering = ["id"]
     authorization = auths.AnonMethodAllowed().set_allowed(["POST"])
     list_allowed_methods = ['post']
     detail_allowed_methods = []
     readonlys = ["user_agent"]
     description = """Flag face resource due to inappropriate content, \
Example #3
0
 class Meta:
     queryset = models.Feedback.objects.all()
     include_resource_uri = False
     list_allowed_methods = ['post']
     detail_allowed_methods = []
     ordering = ["id"]
     excludes = ["datetime", "processed", "image"]
     readonlys = ["useragent"]
     authorization = auths.AnonMethodAllowed().set_allowed(["POST"])
     description = """Send feedback to the developers through this."""
Example #4
0
 class Meta:
     queryset = models.UserComment.objects.filter(visible=True)
     include_resource_uri = False
     always_return_data = True
     list_allowed_methods = ['post']
     detail_allowed_methods = []
     ordering = ["id"]
     fields = ["username", "text", "time", "color"]
     readonlys = ["time"]
     description = """User comment on a face"""
     authorization = auths.AnonMethodAllowed().set_allowed(["POST"])
Example #5
0
    class Meta:
        queryset = models.Face.objects.filter(removed=False)
        max_limit = 1000
        allowed_methods = (
            'get',
            'post',
            'put',
            'delete',
        )
        filtering = {"id": ["lte", "lt", "gte", "gt"], "accepted": ["exact"]}

        ordering = ["id", "views", "hotness"]
        excludes = [
            "gif", "png", "jpg", "webp", "small", "medium", "large", "huge",
            "removed"
        ]
        authorization = auths.AnonMethodAllowed().set_allowed(
            ["GET", "POST", "PUT"])
Example #6
0
 class Meta:
     queryset = models.Flag.objects.all()
     include_resource_uri = False
     ordering = ("id", )
     authorization = auths.AnonMethodAllowed().set_allowed(["POST"])
     allowed_methods = ('post', )
Example #7
0
 class Meta:
     queryset = models.Feedback.objects.all()
     include_resource_uri = False
     filtering = {"processed": ["exact"]}
     ordering = ["id", "processed"]
     authorization = auths.AnonMethodAllowed().set_allowed(["POST"])