def get(self,key): user = User() categroy = Category() user_keys = user.allKey() category_keys = categroy.allKey() _data_user = user.all(user_keys) _data_category = categroy.all(category_keys) data = {} if key: board = Board() board.data = board.get(key) data['title'] = board.data['title'] data['key'] = board.data['key'] data['user'] = board.data['user'] data['category'] = board.data['category'] data['createTime'] = board.data['createTime'] data['follow'] = board.data['follow'] else: data['title'] = '' data['key'] = '' data['user'] = '' data['category'] = '' self.render('manager/board_new.html',data = data,data_user = _data_user,data_category = _data_category)
def get(self): category = Category() keys = category.allKey() _data = category.all(keys) #print _data self.render('ajax/board.html',cats = _data)