def get(self): errors = self.session.get('errors', None) form_data = self.session.get('form_data', None) # This page is active only when acl is enabled if self.acl == 'False': self.redirect('/') else: # This page is active only when there are no users in the system users = user_model.count_users() if users == 0: self.render('create_user.html', errors=errors, form_data=form_data) else: self.redirect('/login')
def get(self): # Redirect if there are no users in the database users = user_model.count_users() if users == 0: self.redirect('/create_user') else: message = self.session.get('message',None) errors = self.session.get('errors',None) next = self.get_argument('next', None) try: del self.session['errors'] del self.session['message'] except: pass self.render('login.html', message=message, errors=errors, next=next)
def get(self): # Redirect if there are no users in the database users = user_model.count_users() if users == 0: self.redirect('/create_user') else: message = self.session.get('message', None) errors = self.session.get('errors', None) next = self.get_argument('next', None) try: del self.session['errors'] del self.session['message'] except: pass self.render('login.html', message=message, errors=errors, next=next)