Exemple #1
0
 def get(self, page=None, pre_page=None, fid=None):
     if fid:
         return self.succ(DocField.get(fid))
     return self.succ(DocField.select(
         page,
         pre_page
     ))
Exemple #2
0
 def delete(self, fid):
     field = DocField.get(fid)
     DocField.delete(fid, auto_commit=False)
     return self.success(DOC.DELETE, DocField, field)
Exemple #3
0
 def put(self, fid):
     submit = self.request()
     submit["id"] = fid
     df = DocField.edit(submit, auto_commit=False)
     submit["doc_id"] = df.doc_id
     return self.success(DOC.PUT, DocField, submit)
Exemple #4
0
 def post(self, fid):
     submit = self.request()
     submit["doc_id"] = fid
     DocField.add(submit, auto_commit=False)
     return self.success(DOC.NEW, DocField, submit)