1 # -*- encoding: utf-8 -*-
3 __author__= "Ćukasz Rekucki"
4 __date__ = "$2009-09-20 21:48:03$"
5 __doc__ = "Module documentation."
8 from piston.emitters import Emitter
9 from piston.utils import rc
11 class TextEmitter(Emitter):
12 def render(self, request):
13 return unicode(self.construct())
15 Emitter.register('text', TextEmitter, 'text/plain; charset=utf-8')
16 Emitter.register('rawxml', TextEmitter, 'application/xml; charset=utf-8')
19 class DjangoAuth(object):
21 def is_authenticated(self, request):
22 return request.user.is_authenticated()