Esempio n. 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))
Esempio n. 2
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))
Esempio n. 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)
Esempio n. 4
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))
Esempio n. 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))
Esempio n. 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))
Esempio n. 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)
Esempio n. 8
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))
Esempio n. 9
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)
Esempio n. 10
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))
Esempio n. 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))
Esempio n. 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))
Esempio n. 13
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))