예제 #1
0
 def market_risk(self, request, params):
     self.preprocess_default(request)
     data = todict(params)
     id = data.get('id', None)
     dt = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_marketRisk(self.object.id, dt, id))
예제 #2
0
파일: views.py 프로젝트: OspreyX/flow
 def market_risk(self, request, params):
     self.preprocess_default(request)
     data   = todict(params)
     id     = data.get('id',None)
     dt     = date2yyyymmdd(self.date)
     proxy  = userproxyserver(request.user)
     return simpledump(proxy.raw_marketRisk(self.object.id, dt, id))
예제 #3
0
 def load_portfolio(self, request, params):
     '''
     Post view to load portfolio
     '''
     proxy = userproxyserver(request.user)
     dt    = date2yyyymmdd(self.date)
     data  = proxy.raw_aggregates(self.team.code,dt)
     return simpledump(data)
예제 #4
0
파일: views.py 프로젝트: OspreyX/flow
 def move_node(self, request, params):
     self.preprocess_default(request)
     data   = todict(params)
     id     = data.get('id',None)
     target = data.get('target',None)
     dt     = date2yyyymmdd(self.date)
     proxy  = userproxyserver(request.user)
     return simpledump(proxy.raw_movePortfolioNode(self.object.id, dt, id, target))
예제 #5
0
 def move_node(self, request, params):
     self.preprocess_default(request)
     data = todict(params)
     id = data.get('id', None)
     target = data.get('target', None)
     dt = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(
         proxy.raw_movePortfolioNode(self.object.id, dt, id, target))
예제 #6
0
 def edit_folder(self, request, params):
     '''
     Post view to edit folder
     '''
     self.preprocess_default(request)
     data = todict(params)
     dt = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_editfolder(self.object.id, dt, data))
예제 #7
0
 def load_portfolio(self, request, params):
     '''
     Post view to load portfolio
     '''
     self.preprocess_default(request)
     proxy = userproxyserver(request.user)
     dt = date2yyyymmdd(self.date)
     data = proxy.raw_portfolio(self.object.id, dt)
     return simpledump(data)
예제 #8
0
파일: views.py 프로젝트: OspreyX/flow
 def edit_folder(self, request, params):
     '''
     Post view to edit folder
     '''
     self.preprocess_default(request)
     data  = todict(params)
     dt    = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_editfolder(self.object.id, dt, data))
예제 #9
0
파일: views.py 프로젝트: OspreyX/flow
 def load_portfolio(self, request, params):
     '''
     Post view to load portfolio
     '''
     self.preprocess_default(request)
     proxy = userproxyserver(request.user)
     dt    = date2yyyymmdd(self.date)
     data  = proxy.raw_portfolio(self.object.id,dt)
     return simpledump(data)
예제 #10
0
파일: views.py 프로젝트: OspreyX/flow
 def remove_folder(self, request, params):
     '''
     Post view to add a folder
     '''
     self.preprocess_default(request)
     data  = todict(params)
     id    = data.get('id',None)
     dt    = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_removePortfolioNode(self.object.id, dt, id))
예제 #11
0
 def remove_folder(self, request, params):
     '''
     Post view to add a folder
     '''
     self.preprocess_default(request)
     data = todict(params)
     id = data.get('id', None)
     dt = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_removePortfolioNode(
         self.object.id, dt, id))
예제 #12
0
 def add_folder(self, request, params):
     '''
     Post view to add a folder
     '''
     self.preprocess_default(request)
     data = todict(params)
     code = data.get('code', None)
     pid = data.get('parent', None)
     dt = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_addfolder(self.object.id, dt, code, pid))
예제 #13
0
파일: views.py 프로젝트: OspreyX/flow
 def add_folder(self, request, params):
     '''
     Post view to add a folder
     '''
     self.preprocess_default(request)
     data  = todict(params)
     code  = data.get('code',None)
     pid   = data.get('parent',None)
     dt    = date2yyyymmdd(self.date)
     proxy = userproxyserver(request.user)
     return simpledump(proxy.raw_addfolder(self.object.id, dt, code, pid))