code: def view_dep(self, dep):
          
          log.debug('Viewing department %s', dep.name)
          self.cur_dep = None
          self.pages_tabw.setCurrentIndex(6)
          self.dep_name_le.setText(dep.name)
          self.dep_short_le.setText(dep.short)
          self.dep_shot_rb.setChecked(not dep.assetflag)
          self.dep_asset_rb.setChecked(dep.assetflag)
          self.dep_ordervalue_sb.setValue(dep.ordervalue)
          self.dep_desc_pte.setPlainText(dep.description)
  
          rootdata = treemodel.ListItemData(['Name', 'Short', 'Path', 'Created', 'Semester', 'Status', 'Resolution', 'FPS', 'Scale'])
          rootitem = treemodel.TreeItem(rootdata)
          prjs = dep.projects.all()
          for prj in prjs:
              prjdata = djitemdata.ProjectItemData(prj)
              treemodel.TreeItem(prjdata, rootitem)
          self.dep_prj_model = treemodel.TreeModel(rootitem)
          self.dep_prj_tablev.setModel(self.dep_prj_model)
  
          self.cur_dep = dep
docs: View the given department on the department page
  
          :param dep: the dep to view
          :type dep: :class:`jukeboxcore.djadapter.models.Department`
          :returns: None
          :rtype: None
          :raises: None