View the, in the atype table view selected, assettype.

        :returns: None
        :rtype: None
        :raises: None
167575
def prj_view_atype(self, *args, **kwargs):
        
        if not self.cur_prj:
            return
        i = self.prj_atype_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            atype = item.internal_data()
            self.view_atype(atype)
213595
def asset_save(self):
        
        if not self.cur_asset:
            return

        desc = self.asset_desc_pte.toPlainText()
        self.cur_asset.description = desc
        self.cur_asset.save()
1056718
def asset_view_task(self, ):
        
        if not self.cur_asset:
            return

        i = self.asset_task_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            task = item.internal_data()
            self.view_task(task)
702165
def show(self):
        
        if self.isHidden():
            QWidget.show(self)
            self._qpart.updateViewport()
1242891
def classview_for(self, action='view'):
        
        app = current_app._get_current_object()
        return self.view_for_endpoints[app][action][0](self)
128630
def format(self, model: AssetAllocationModel, full: bool = False):
        
        self.full = full

        # Header
        output = f"Asset Allocation model, total: {model.currency} {model.total_amount:,.2f}\n"

        # Column Headers
        for column in self.columns:
            name = column['name']
            if not self.full and name == "loc.cur.":
                # Skip local currency if not displaying stocks.
                continue
            width = column["width"]
            output += f"{name:^{width}}"
        output += "\n"
        output += f"-------------------------------------------------------------------------------\n"

        # Asset classes

        view_model = ModelMapper(model).map_to_linear(self.full)
        for row in view_model:
            output += self.__format_row(row) + "\n"

        return output
979319
def user_view_prj(self, ):
        
        i = self.user_prj_tablev.currentIndex()
        item = i.internalPointer()
        if item:
            prj = item.internal_data()
            self.view_prj(prj)
607521
def create_atype(self, ):
        
        name = self.name_le.text()
        desc = self.desc_pte.toPlainText()
        try:
            atype = djadapter.models.Atype(name=name, description=desc)
            atype.save()
            for prj in self.projects:
                atype.projects.add(prj)
            self.atype = atype
            self.accept()
        except:
            log.exception("Could not create new assettype")
890445
def analysis_log_view(self):
        
        service = self.get_analysis_or_service()
        if not self.can_view_logs_of(service):
            return None
        view = api.get_view("auditlog", context=service, request=self.request)
        view.update()
        view.before_render()
        return view
823344
def __load_asset_class(self, ac_id: int):
        
        # open database
        db = self.__get_session()
        entity = db.query(dal.AssetClass).filter(dal.AssetClass.id == ac_id).first()
        return entity
1173283
def get_load_times(self, asset_type):
        
        load_times = []
        search_str = '{0}_load_time'.format(asset_type)
        for har_page in self.pages:
            val = getattr(har_page, search_str, None)
            if val is not None:
                load_times.append(val)
        return load_times
752098
def get_type(symbol):
    '''
    
    '''
    url = 'http://finance.yahoo.com/q/pr?s=%s+Profile' % symbol
    soup = BeautifulSoup(urlopen(url).read())
    if soup.find('span', text='Business Summary'):
        return 'Stock'
    elif soup.find('span', text='Fund Summary'):
        asset_type = 'Fund'
    elif symbol.find('^') == 0:
        asset_type = 'Index'
    else:
        pass
    return asset_type
1165611
def view(self, sort=None, purge=False, done=None, undone=None, **kwargs):
        
        View(self.model.modify(
            sort=self._getPattern(sort),
            purge=purge,
            done=self._getDone(done, undone)
        ), **kwargs)
264443
def _get_asset_size(self, asset_type):
        
        if asset_type == 'page':
            assets = self.entries
        else:
            assets = getattr(self, '{0}_files'.format(asset_type), None)
        return self.get_total_size(assets)
989426
def views_on(self) -> str:
        
        views = self._data['views_on']
        return self.random.choice(views)
550950
def tablesAndViews(self):
      """"""
      result = self.execute(
        u'SELECT name,type FROM sqlite_master WHERE type in ("table", "view")',
        commit=False)
      return ((row['name'],row['type']) for row in result)
157176
def view_asset(self, asset):
        
        log.debug('Viewing asset %s', asset.name)
        self.cur_asset = None
        self.pages_tabw.setCurrentIndex(5)

        name = asset.name
        prj = asset.project.name
        atype = asset.atype.name
        desc = asset.description
        self.asset_name_le.setText(name)
        self.asset_prj_le.setText(prj)
        self.asset_atype_le.setText(atype)
        self.asset_desc_pte.setPlainText(desc)

        assetsrootdata = treemodel.ListItemData(["Name", "Description"])
        assetsrootitem = treemodel.TreeItem(assetsrootdata)
        self.asset_asset_model = treemodel.TreeModel(assetsrootitem)
        self.asset_asset_treev.setModel(self.asset_asset_model)
        atypes = {}
        assets = asset.assets.all()
        for a in assets:
            atype = a.atype
            atypeitem = atypes.get(atype)
            if not atypeitem:
                atypedata = djitemdata.AtypeItemData(atype)
                atypeitem = treemodel.TreeItem(atypedata, assetsrootitem)
                atypes[atype] = atypeitem
            assetdata = djitemdata.AssetItemData(a)
            treemodel.TreeItem(assetdata, atypeitem)

        tasksrootdata = treemodel.ListItemData(["Name", "Short"])
        tasksrootitem = treemodel.TreeItem(tasksrootdata)
        self.asset_task_model = treemodel.TreeModel(tasksrootitem)
        self.asset_task_tablev.setModel(self.asset_task_model)
        tasks = asset.tasks.all()
        for t in tasks:
            tdata = djitemdata.TaskItemData(t)
            treemodel.TreeItem(tdata, tasksrootitem)

        self.cur_asset = asset