Exemplo n.º 1
0
def delete_record_pro():
    # 하이퍼링크의 데이터값 전달받기
    c_code = request.args['c_code']
    # 삭제함수 호출
    db.delete_record(c_code)
    country_list = db.get_country_list()
    return render_template('start.html', country_list=country_list)
Exemplo n.º 2
0
    def delete(self, database, table, rowid=None):
        """DELETE record"""

        if not rowid:
            raise HTTPError(405)  # Need ROWID

        try:
            db.delete_record(database, table, rowid)
        except db.NoSuchDatabase:
            raise HTTPError(404)
Exemplo n.º 3
0
    def delete(self, database, table, rowid=None):
        """DELETE record"""

        if not rowid:
            raise HTTPError(405)  # Need ROWID

        try:
            db.delete_record(database, table, rowid)
        except db.NoSuchDatabase:
            raise HTTPError(404)
Exemplo n.º 4
0
 def test_delete_record(self):
     # TODO: define behavior for when a record does not exist
     id = db.insert_record(TEST_DB, TEST_TABLE, col1=123, col2='abc')
     db.delete_record(TEST_DB, TEST_TABLE, id)
     res = db.get_record(TEST_DB, TEST_TABLE, id)
     self.assertEqual(res, None)
Exemplo n.º 5
0
 def test_delete_record(self):
     # TODO: define behavior for when a record does not exist
     id = db.insert_record(TEST_DB,TEST_TABLE,col1=123,col2='abc')
     db.delete_record(TEST_DB,TEST_TABLE,id)
     res = db.get_record(TEST_DB,TEST_TABLE,id)
     self.assertEqual(res, None)
Exemplo n.º 6
0
 def delete(self, id):
     if not delete_record(id):
         abort(404, message='Article {} doesn\'t exist'.format(id))
     return '', 204