def adminViewDataset(): try: if adminLoginSession() == 'admin': datasetDAO = DatasetDAO() datasetVOList = datasetDAO.viewDataset() return render_template('admin/viewDataset.html', datasetVOList=datasetVOList) else: adminLogoutSession() except Exception as ex: print(ex)
def viewDataset(): try: if session['sessionloginDict']['loginRole'] == 'admin': datasetDAO=DatasetDAO() datasetVO=DatasetVO() datasetDict=datasetDAO.viewDataset(datasetVO) return render_template('admin/viewDataset.html',datasetDict=datasetDict) else: flash('you are not admin !, Please Login as Admin. ', 'danger') return redirect(url_for('loadLogin')) except: flash('Plese Login First !', 'danger') return redirect(url_for('loadLogin'))