예제 #1
0
파일: models.py 프로젝트: Rdbaker/Rovu-API
 def delete(self, commit=True):
     """Remove the record from the database."""
     DB.delete(self)
     return commit and DB.commit()
예제 #2
0
파일: models.py 프로젝트: Rdbaker/Rovu-API
 def save(self, commit=True):
     """Save the record."""
     DB.add(self)
     if commit:
         DB.commit()
     return self