예제 #1
0
    def insert_data(self, raw_data):

        uid = tools.get_uuid()
        try:
            CabPostHist.create(
                uid=uid,
                title=raw_data.title,
                date=raw_data.date,
                post_id=raw_data.uid,
                time_create=raw_data.time_create,
                user_name=raw_data.user_name,
                cnt_md=raw_data.cnt_md,
                time_update=raw_data.time_update,
                id_spec=raw_data.id_spec,
                logo=raw_data.logo,
            )
            return (uid)
        except:
            return False
예제 #2
0
    def insert_data(self, raw_data):

        uid = tools.get_uuid()
        try:
            CabPostHist.create(
                uid=uid,
                title=raw_data.title,
                date=raw_data.date,
                post_id=raw_data.uid,
                time_create=raw_data.time_create,
                user_name=raw_data.user_name,
                cnt_md=raw_data.cnt_md,
                time_update=raw_data.time_update,
                id_spec=raw_data.id_spec,
                logo=raw_data.logo,
            )
            return (uid)
        except:
            return False
예제 #3
0
파일: mpost_hist.py 프로젝트: Geoion/TorCMS
 def insert_data(self, raw_data):
     print('============')
     print(raw_data.uid)
     print('--------------')
     uid = str(uuid.uuid1())
     entry = CabPostHist.create(
         uid=uid,
         title=raw_data.title,
         date=raw_data.date,
         post_id=raw_data.uid,
         time_create=raw_data.time_create,
         user_name=raw_data.user_name,
         cnt_md=raw_data.cnt_md,
         time_update=raw_data.time_update,
         id_spec=raw_data.id_spec,
         logo=raw_data.logo,
     )
     return (uid)
예제 #4
0
 def insert_data(self, raw_data):
     print('============')
     print(raw_data.uid)
     print('--------------')
     uid = str(uuid.uuid1())
     entry = CabPostHist.create(
         uid=uid,
         title=raw_data.title,
         date=raw_data.date,
         post_id=raw_data.uid,
         time_create=raw_data.time_create,
         user_name=raw_data.user_name,
         cnt_md=raw_data.cnt_md,
         time_update=raw_data.time_update,
         id_spec=raw_data.id_spec,
         logo=raw_data.logo,
     )
     return (uid)
예제 #5
0
파일: mpost_hist.py 프로젝트: Geoion/TorCMS
 def query_all(self):
     return CabPostHist.select().order_by('time_update')
예제 #6
0
파일: mpost_hist.py 프로젝트: Geoion/TorCMS
 def get_by_id(self, in_uid):
     tt = CabPostHist.get(CabPostHist.uid == in_uid)
     return tt
예제 #7
0
파일: mpost_hist.py 프로젝트: Geoion/TorCMS
 def __init__(self):
     try:
         CabPostHist.create_table()
     except:
         pass
예제 #8
0
 def query_all(self):
     return CabPostHist.select().order_by('time_update')
예제 #9
0
 def get_by_id(self, in_uid):
     tt = CabPostHist.get(CabPostHist.uid == in_uid)
     return tt
예제 #10
0
 def __init__(self):
     try:
         CabPostHist.create_table()
     except:
         pass