Introduce DRF and start replacing the views.
[wolnelektury.git] / src / api / emitters.py
1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
4 #
5 """
6 Wrappers for piston Emitter classes.
7 """
8 from piston.emitters import Emitter
9
10
11 # hack
12 class EpubEmitter(Emitter):
13     def render(self, request):
14         return self.data
15
16 Emitter.register('epub', EpubEmitter, 'application/epub+zip')