def index(self): try: if current_user.is_authenticated() and current_user.is_approved(): return self.render('admin/index.html') else: return redirect(url_for('status')) except: return redirect(url_for('status'))
def is_accessible(self): if current_user.is_authenticated() and current_user.is_approved(): return current_user.is_authenticated()