This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TrackMessageView(APIView): | |
renderer_classes = [JPEGRenderer] | |
@property | |
def pixel(self): | |
return open(os.path.join(settings.STATIC_ROOT, 'site/img/pixel.jpg'), 'rb') | |
def get(self, request, *args, **kwargs): | |
manager = BaseManager() | |
message = manager.get_message_by_unique_id(self.kwargs['unique_id']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Тестовое задание (Python / Django) | |
Нужно разработать простое приложение с использованием Django Framework. | |
Приложение должно представлять собой сервис-уменьшатель картинок. | |
Реализовать нужно с применением Django Rest Framework. | |
В API будет всего один метод: resize_picture | |
На вход поступает 3 параметра: |