コード例 #1
0
ファイル: child.py プロジェクト: anndream/next2web
 def get_child(self, saved, idx):
     from helpers import safe_bool
     
     if safe_bool(saved):
         return self.get_child_in_db(idx)
     else:
         return self.get_child_in_session(idx)
コード例 #2
0
ファイル: comment.py プロジェクト: anndream/next2web
    def remove_comment(self, saved, comment_id):
        from helpers import safe_bool

        if safe_bool(saved):
            return self.remove_comment_in_db(int(comment_id))
        else:
            return self.remove_comment_in_session(int(comment_id))