Ejemplo n.º 1
0
class UserView(BaseApiView):
    serializer_class = UserSerializer
    is_user = True
    permissions = get_objects_perms('user_perms')
    fields_to_update = get_model_fields('user_model_fields')

    def get_queryset(self):
        return User.objects.exclude(first_name="Anonymous").filter(
            is_confirmed=True).filter(is_superuser=False)
Ejemplo n.º 2
0
class PostView(BaseApiView):
    queryset = Post.objects.all()
    serializer_class = PostSerializer
    permissions = get_objects_perms('post_perms')
    fields_to_update = get_model_fields('post_fields')
Ejemplo n.º 3
0
class AboutView(BaseApiView):
    queryset = AboutCompany.objects.all()
    serializer_class = AboutSerializer
    fields_to_update = get_model_fields('about_model_fields')
Ejemplo n.º 4
0
class AnswerChildReplyView(AnswerReplyView):
    fields_to_update = get_model_fields('answer_reply_child_fields')
Ejemplo n.º 5
0
class AnswerReplyView(BaseApiView):
    queryset = AnswerReply.objects.all()
    serializer_class = AnswerReplySerializer
    permissions = get_objects_perms('answer_reply_perms')
    fields_to_update = get_model_fields('answer_reply_fields')
Ejemplo n.º 6
0
class AnswerCommentView(BaseApiView):
    queryset = AnswerComment.objects.all()
    serializer_class = AnswerCommentSerializer
    permissions = get_objects_perms('answer_comment_perms')

    fields_to_update = get_model_fields('answer_comment_fields')
Ejemplo n.º 7
0
class QuestionView(BaseApiView):
    queryset = Question.objects.all()
    serializer_class = QuestionSerializer
    permissions = get_objects_perms('question_perms')
    fields_to_update = get_model_fields('question_model_fields')
Ejemplo n.º 8
0
class PostChildReplyView(PostReplyView):
    fields_to_update = get_model_fields('post_reply_child_fields')