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')
18 class DjangoAuth(object):
20 def is_authenticated(self, request):
21 return request.user.is_authenticated()