Exemplo n.º 1
0
def answer(request, cursor=None, amount=None, id_answer=None):
    return action(request,
                  Answer,
                  AnswerSerializer,
                  id_answer,
                  cursor=cursor,
                  amount=amount,
                  is_restricted=True,
                  linked_to_user=False)
Exemplo n.º 2
0
def question(request, cursor=None, amount=None, id_question=None):
    return action(request,
                  Question,
                  QuestionSerializer,
                  id_question,
                  cursor=cursor,
                  amount=amount,
                  is_restricted=True,
                  linked_to_user=False)
Exemplo n.º 3
0
def dislike(request, cursor=None, amount=None, id_dislike=None):
    return action(request,
                  Dislike,
                  DislikeSerializer,
                  id_dislike,
                  cursor=cursor,
                  amount=amount,
                  is_restricted=False,
                  linked_to_user=True)
Exemplo n.º 4
0
def quiz(request, cursor=None, amount=None, id_quiz=None):
    if request.method == 'GET':
        return action(request,
                      Quiz,
                      QuizSerializer,
                      id_quiz,
                      cursor=cursor,
                      amount=amount,
                      is_restricted=False,
                      linked_to_user=False)
    else:
        return action(request,
                      Quiz,
                      QuizSerializer,
                      id_quiz,
                      cursor=cursor,
                      amount=amount,
                      is_restricted=True,
                      linked_to_user=True)
Exemplo n.º 5
0
def fullquiz(request, cursor=None, amount=None, id_quiz=None):

    return action(request,
                  Quiz,
                  CompleteQuizSerializer,
                  id_quiz,
                  cursor=cursor,
                  amount=amount,
                  is_restricted=True,
                  linked_to_user=True)
Exemplo n.º 6
0
def caruser(request, id_car=None, cursor=None, amount=None):
    return action(request, CarUser, CarUserSerializer, id_car, cursor, amount, is_restricted=True, linked_to_user=True)
Exemplo n.º 7
0
def carwithauth(request, id_car=None, cursor=None, amount=None):
    return action(request, Car, CarSerializer, id_car, cursor, amount, is_restricted=True, linked_to_user=False)