def __call__(self, model, request): if not authenticated(request): return render_tile(model, request, 'loginform') return Tile.__call__(self, model, request)
def authenticated(self, widget, data): if not authenticated(self.request): raise ExtractionError(u'Invalid Credentials')