def get(self, request, user_id):
     serializer = GetterSerializerService(GeneralInformationSerializer)
     response = ResponseService()
     controller = GeneralInformationGetterController(
         serializer=serializer,
         response=response,
     )
     response = controller(user_id=user_id)
     return response
Ejemplo n.º 2
0
 def get(self, request, student_id):
     repository = AddressRepository()
     serializer = GetterSerializerService(AddressSerializer)
     response = ResponseService()
     getter_controller = AddressGetterController(repository=repository,
                                                 serializer=serializer,
                                                 response=response)
     response = getter_controller(student_id=student_id)
     return response
Ejemplo n.º 3
0
 def get(self, request, institute_id):
     user = request.user
     repository = StudentInstituteRepository()
     serializer = GetterSerializerService(InstituteSerializer)
     response = ResponseService()
     getter_controller = InstituteGetterController(repository=repository,
                                                   serializer=serializer,
                                                   response=response)
     response = getter_controller(student_id=user.student.id,
                                  id=institute_id)
     return response
Ejemplo n.º 4
0
 def get(self, request):
     repository = MajorRepository()
     serializer = GetterSerializerService(MajorSerializer, True)
     response = ResponseService()
     controller = MajorFilterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller()
     return response
Ejemplo n.º 5
0
 def get(self, request, university_id):
     repository = UniversityRepository()
     serializer = GetterSerializerService(UniversitySerializer)
     response = ResponseService()
     service = UniversityGetterService(repository)
     controller = UniversityFilterController(repository=repository,
                                             serializer=serializer,
                                             response=response,
                                             getter_service=service)
     response = controller(id=university_id)
     return response
Ejemplo n.º 6
0
 def get(self, request, student_id, medical_information_id):
     repository = MedicalInformationRepository()
     serializer = GetterSerializerService(MedicalInformationSerializer)
     response = ResponseService()
     controller = MedicalInformationGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(student_id=student_id, id=medical_information_id)
     return response
Ejemplo n.º 7
0
 def get(self, request):
     repository = UniversityRepository()
     serializer = GetterSerializerService(UniversitySerializer, True)
     response = ResponseService()
     controller = UniversityFilterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller()
     return response
 def get(self, request, student_id):
     repository = AcademicInformationRepository()
     serializer = GetterSerializerService(AcademicInformationSerializer)
     response = ResponseService()
     controller = AcademicInformationGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(id=student_id)
     return response
Ejemplo n.º 9
0
 def post(self, request):
     request_service = RequestService(request.data, LoginCreatorSerializer)
     response = ResponseService()
     serializer = GetterSerializerService(LoginGetterSerializer, context={"request": request})
     login_controller = LoginController(
         request=request_service,
         serializer=serializer,
         response=response
     )
     response = login_controller()
     return response
Ejemplo n.º 10
0
 def get(self, request, student_id, type):
     repository = AddressRepository()
     serializer = GetterSerializerService(AddressSerializer)
     response = ResponseService()
     controller = ParentAddressGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(student_id=student_id, type=type)
     return response
Ejemplo n.º 11
0
 def get(self, request, student_id):
     repository = StudentRepository()
     serializer = GetterSerializerService(ProfileSerializer)
     response = ResponseService()
     controller = ProfileGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(id=student_id)
     return response
Ejemplo n.º 12
0
 def get(self, request, user_id):
     repository = UserRepository()
     serializer = GetterSerializerService(UserSerializer)
     response = ResponseService()
     controller = UserGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(id=user_id)
     return response
Ejemplo n.º 13
0
 def get(self, request, user_id):
     repository = ProfileImageRepository()
     serializer = GetterSerializerService(ProfileImageSerializer,
                                          context={"request": request})
     response = ResponseService()
     controller = ProfileImageGetterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(user_id=user_id)
     return response
Ejemplo n.º 14
0
 def get(self, request, major_id):
     repository = MajorRepository()
     serializer = GetterSerializerService(MajorSerializer)
     response = ResponseService()
     service = MajorGetterService(repository)
     controller = MajorFilterController(
         repository=repository,
         serializer=serializer,
         response=response,
         getter_service=service
     )
     response = controller(id=major_id)
     return response
Ejemplo n.º 15
0
 def get(self, request, university_id, major_id):
     repository = PeriodRepository()
     serializer = GetterSerializerService(PeriodSerializer, True)
     response = ResponseService()
     controller = PeriodFilterController(
         repository=repository,
         serializer=serializer,
         response=response,
     )
     response = controller(
         academic_period__academic_major__university_id=university_id,
         academic_period__academic_major__major_id=major_id)
     return response
Ejemplo n.º 16
0
 def get(self, request):
     user = request.user
     repository = StudentInstituteRepository()
     serializer = GetterSerializerService(InstituteSerializer, many=True)
     response = ResponseService()
     filter_service = InstituteFilterService(repository=repository)
     getter_controller = InstituteGetterController(
         repository=repository,
         getter_service=filter_service,
         serializer=serializer,
         response=response)
     response = getter_controller(student_id=user.student.id)
     return response
Ejemplo n.º 17
0
 def get(self, request, university_id, major_id, period_id,
         period_number_id):
     repository = GroupRepository()
     serializer = GetterSerializerService(GroupSerializer, True)
     response = ResponseService()
     controller = GroupFilterController(repository=repository,
                                        serializer=serializer,
                                        response=response)
     response = controller(
         academic_group__academic_period_number__academic_period__academic_major__university_id
         =university_id,
         academic_group__academic_period_number__academic_period__academic_major__major_id
         =major_id,
         academic_group__academic_period_number__academic_period__period__id
         =period_id,
         academic_group__academic_period_number__period_number__id=
         period_number_id,
         academic_group__is_active=True)
     return response