Beispiel #1
0
    def post_ajax(self, request, *args, **kwargs):
        file_text = request.POST['text']

        parser = FileParser()
        directories = parser.read_directories(file_text)
        movies = movies_parser(directories)

        # Mario can add movies to data base

        response_dict = {'response': file_text}
        return self.render_json_response(response_dict, status=200)
Beispiel #2
0
    def post_ajax(self, request, *args, **kwargs):
        file_text = request.POST['text']

        parser = FileParser()
        directories = parser.read_directories(file_text)
        movies = movies_parser(directories)

        log.info('Parsed {} movies'.format(len(movies)))

        _search_and_create_movies(movies, request.user)

        return self.render_json_response({}, status=200)
Beispiel #3
0
    def post_ajax(self, request, *args, **kwargs):
        file_text = request.POST['text']

        parser = FileParser()
        directories = parser.read_directories(file_text)
        movies = movies_parser(directories)

        log.info('Parsed {} movies'.format(len(movies)))

        _search_and_create_movies(movies, request.user)

        return self.render_json_response({}, status=200)