def editCity(): if session['loginRole'] != 'admin': return redirect(url_for('login')) cityDAO = CityDAO() stateDAO = StateDAO() cityVO = CityVO() cityVO.cityId = request.args.get('cityId') cityDict = cityDAO.editCity(cityVO) stateDict = stateDAO.searchState() print(cityDict) return render_template('admin/editCity.html', cityDict=cityDict, stateDict=stateDict)
def adminEditCity(): try: if adminLoginSession() == "admin": cityVO = CityVO() cityDAO = CityDAO() cityId = request.args.get('cityId') cityVO.cityId = cityId cityVOList = cityDAO.editCity(cityVO) print("=======cityVOList=======", cityVOList) print("=======type of cityVOList=======", type(cityVOList)) return render_template('admin/editCity.html', cityVOList=cityVOList) else: return adminLogoutSession() except Exception as ex: print(ex)