计算机毕业设计选题推荐-自习室座位预约系统-Java/Python项目实战
✨作者主页:IT毕设梦工厂✨
个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。
☑文末获取源码☑
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目
文章目录
- 一、前言
- 二、开发环境
- 三、系统界面展示
- 四、部分代码设计
- 五、论文参考
- 六、系统视频
- 结语
一、前言
在快节奏的学习和工作环境中,自习室成为学生和上班族寻求安静学习空间的重要场所。然而,随着用户数量的增加,自习室座位的供需矛盾日益突出。据统计,许多高校图书馆和自习室在考试季和高峰时段常常出现座位不足的现象,导致学生不得不提前数小时排队等候。此外,由于缺乏有效的座位管理系统,自习室内的座位占用效率并不理想,存在长时间占座却不定期使用的问题。因此,开发一个自习室座位预约系统,对于优化座位资源分配、提高自习室使用效率具有重要意义。
现有的自习室座位管理多采用先到先得的方式,缺乏有效的预约和监管机制。例如,一些自习室虽设有座位预约板,但信息更新不及时,且缺乏对预约行为的约束,导致预约系统形同虚设。此外,由于缺少在线管理平台,学生无法实时了解座位使用情况,难以做出合理的学习安排。还有自习室的公告和留言板管理也较为落后,信息传递效率低下,无法满足学生获取即时信息的需求。这些问题的存在,不仅影响了自习室座位的有效利用,也降低了学生的学习效率。
本课题旨在设计并实现一个便捷的自习室座位预约系统,通过在线预约、实时监管、信息发布等功能,解决现有自习室座位管理中存在的问题。系统将实现用户信息管理、座位状态实时更新、预约流程自动化、公告信息即时发布、留言板互动交流等功能,旨在提高自习室座位的利用率和学生的学习体验。
在自习室座位预约系统中,管理人员负责用户账户的创建与维护、座位信息的配置与管理、公告内容的发布与更新、留言板的监管与维护,确保系统信息的准确性和社区交流的秩序;学生用户则能够通过系统进行座位的预约与取消、查看公告信息、在留言板上发布和回复信息,享受便捷的座位预约服务和及时的交流体验。系统通过这些功能模块的整合,旨在提供一个便捷的自习室座位预约和管理平台。
本课题的研究具有重要的理论意义和实际意义。从理论角度来看,它为自习室座位管理提供了新的研究视角,即如何利用信息技术优化资源分配和管理流程。从实际角度来看,自习室座位预约系统的应用将显著提升自习室座位的使用效率,减少资源浪费,同时为学生提供更加便捷、舒适的学习环境。此外,系统的推广应用还将有助于培养学生的规则意识和时间管理能力,促进学习行为的规范化,提高学习效率。
二、开发环境
- 开发语言:Java/Python
- 数据库:MySQL
- 系统架构:B/S
- 后端:SpringBoot/SSM/Django/Flask
- 前端:Vue
三、系统界面展示
- 自习室座位预约系统界面展示:
管理员-座位信息管理:
管理员-公告管理:
用户-留言:
用户-预约座位:
四、部分代码设计
- Java项目实战-代码参考:
@RestController
@RequestMapping("/admin")
public class AdminController {@ResourceAdminService adminService;@PostMapping("/updateSport")public Map<String, Object> updateSport(@RequestBody Map<String, Object> map) {adminService.updateSport(map);return new R().ok().builder();}@PostMapping("/addAnnounce")public Map<String, Object> addAnnounce(@RequestBody Map<String, Object> map) {map.put("datetime", System.currentTimeMillis());adminService.addAnnounce(map);return new R().ok().builder();}@PostMapping("/addSeat")public Map<String, Object> addSeat(@RequestBody Map<String, Object> map) {adminService.addSeat(map);return new R().ok().builder();}@PostMapping("/deleteSeat")public Map<String, Object> deleteSeat(@RequestBody Map<String, Object> map) {adminService.deleteSeat(map);return new R().ok().builder();}@PostMapping("/deleteArticle")public Map<String, Object> deleteArticle(@RequestBody Map<String, Object> map) {adminService.deleteArticle(map);return new R().ok().builder();}@PostMapping("/deleteAnnounce")public Map<String, Object> deleteAnnounce(@RequestBody Map<String, Object> map) {adminService.deleteAnnounce(map);return new R().ok().builder();}@PostMapping("/updatePwd")public Map<String, Object> updatePwd(@RequestBody Map<String, Object> map) {adminService.updatePassword(map);return new R().ok().builder();}@GetMapping("/getUser")public Map<String, Object> getUser() {List<Map<String, Object>> list = adminService.getUser();return new R().ok().add("rows", list).builder();}@GetMapping("/getTeacher")public Map<String, Object> getTeacher() {List<Map<String, Object>> list = adminService.getTeacher();return new R().ok().add("rows", list).builder();}@GetMapping("/getRoomList")public Map<String, Object> getRoomList() {List<Room> list = adminService.getRoomList();return new R().ok().add("rows", list).builder();}// getById@GetMapping("/getById/{id}")public Map<String, Object> getById(@PathVariable("id") int id) {List<Room> map = adminService.getById(id);return new R().ok().add("data", map).builder();}// updateRoom@PostMapping("/updateRoom")public Map<String, Object> updateRoom(@RequestBody Room room) {String chineseFirstLetterCapitalized = getChineseFirstLetterCapitalized(room.getAreaName());if (chineseFirstLetterCapitalized.isEmpty()) {chineseFirstLetterCapitalized = UUID.randomUUID().toString();}room.setSubName(chineseFirstLetterCapitalized);adminService.updateRoom(room);return new R().ok().builder();}// addRoom@PostMapping("/addRoom")public Map<String, Object> addRoom(@RequestBody Room room) {String chineseFirstLetterCapitalized = getChineseFirstLetterCapitalized(room.getAreaName());if (chineseFirstLetterCapitalized.isEmpty()) {chineseFirstLetterCapitalized = UUID.randomUUID().toString();}room.setSubName(chineseFirstLetterCapitalized);adminService.addRoom(room);return new R().ok().builder();}// deleteRoomById@GetMapping("/deleteRoomById/{id}")public Map<String, Object> deleteRoomById(@PathVariable("id") int id) {List<Room> byId = adminService.getById(id);Integer status = byId.get(0).getStatus();if (status == 1) {return new R().bad().add("msg", "该房间正在使用中,无法删除").builder();}adminService.deleteRoomById(id);return new R().ok().builder();}@GetMapping("/getStatistics")public Map<String, Object> getStatistics() {List<Map<String, Object>> list = adminService.getStatistics();List<Map<String, Object>> timeList = new ArrayList<>();for (int i = 16; i < 45; i++) {String time = (i / 2) + (i % 2 == 0 ? ":00" : ":30");String endTime = ((i + 1) / 2) + ((i + 1) % 2 == 0 ? ":00" : ":30");int sum = 0;for (Map<String, Object> map : list) {Date date = new Date((long) map.get("startTime"));Calendar cr = Calendar.getInstance();cr.setTime(date);int startHalfHour = cr.get(Calendar.HOUR_OF_DAY) * 2 + (cr.get(Calendar.MINUTE) > 0 ? 1 : 0);Date date2 = new Date((long) map.get("endTime"));Calendar cr2 = Calendar.getInstance();cr.setTime(date2);int endHalfHour = cr2.get(Calendar.HOUR_OF_DAY) * 2 + (cr2.get(Calendar.MINUTE) > 0 ? 1 : 0);if (startHalfHour <= i && endHalfHour > i) {++sum;}}Map<String, Object> item = new HashMap<>();item.put("time", time + "-" + endTime);item.put("sum", sum);timeList.add(item);}return new R().ok().add("userCounter", adminService.getUserCounter()).add("timeList", timeList).builder();}public static String getChineseFirstLetterCapitalized(String chinese) {StringBuilder capitalizedLetters = new StringBuilder();for (char c : chinese.toCharArray()) {if (Character.UnicodeBlock.of(c) == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS) { // 判断是否是汉字String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(c);if (pinyinArray != null && pinyinArray.length > 0) {// 取拼音的第一个字符并转大写String firstLetter = pinyinArray[0].substring(0, 1).toUpperCase();capitalizedLetters.append(firstLetter);}} else {capitalizedLetters.append(c);}}return capitalizedLetters.toString();}
}
@RestController
@EnableAutoConfiguration
@RequestMapping("/public")
public class PublicController {@ResourcePublicService publicService;@ResourceUserService userService;private final DynamicTaskService dynamicTask;public PublicController(DynamicTaskService dynamicTask) {this.dynamicTask = dynamicTask;}{//启动项目,重启预约线程Timer timer = new Timer();TimerTask timerTask = new TimerTask() {@Overridepublic void run() {//所有等待或使用状态的预约都需要检查 状态0/1/3的数据List<Map<String, Object>> list = publicService.getNeedCheckReservation();for (Map<String, Object> map : list) {int state = (int) map.get("state");long startTime = new Long(map.get("startTime").toString());//预约结束时自动恢复座位状态dynamicTask.add(new MyTask(ReservationCode.FINISH + "-" + map.get("sid"), (long) map.get("endTime"), () -> {userService.updateReservation(ReservationCode.FINISH, map.get("rid"));userService.updateSeat(SeatCode.CAN_USE, map.get("sid"));}));//使用中的if (state == ReservationCode.SIGNED_BE_USE) {}//预约中的else if (state == ReservationCode.TIME_BEGAN) {//超时设置违约状态并释放座椅dynamicTask.add(new MyTask(ReservationCode.UNSIGNED + "-" + map.get("sid"),startTime + 30 * 60 * 1000L, () -> {dynamicTask.stop(ReservationCode.FINISH + "-" + map.get("sid"));publicService.updateReservation(ReservationCode.UNSIGNED, map.get("rid"));userService.updateSeat(SeatCode.CAN_USE, map.get("sid"));}));}//暂离的else if (state == ReservationCode.LEAVE) {dynamicTask.add(new MyTask(ReservationCode.LEAVE_UNSIGNED + "-" + map.get("sid"),((long) map.get("leaveTime")) + 60 * 60 * 1000L, () -> {dynamicTask.stop(ReservationCode.FINISH + "-" + map.get("sid"));publicService.updateReservation(ReservationCode.LEAVE_UNSIGNED, map.get("rid"));userService.updateSeat(SeatCode.CAN_USE, map.get("sid"));}));}}}};timer.schedule(timerTask, 5000);}/*** 通过座位id获取签到码** @param map* @return*/@PostMapping("/getSignedNumber")public Map<String, Object> getSignedNumber(@RequestBody Map<String, Object> map) {Map<String, Object> reservation = publicService.getReservationBySid(map.get("sid"));HashMap<String, Object> result = new R().ok().builder();Object state = reservation.get("state");if (state.equals(ReservationCode.TIME_BEGAN)) {result.put("number", SignedNumber.getSignedNumber(reservation));} else if (state.equals(ReservationCode.LEAVE)) {result.put("number", SignedNumber.getLeaveSignedNumber(reservation));}return result;}/*** 查看已开启但还未执行的动态任务** @return*/@GetMappingpublic List<String> getStartingDynamicTask() {return dynamicTask.getTaskList();}/*** 根据名称 停止一个动态任务** @param name* @return*/@DeleteMapping("/{name}")public String stopDynamicTask(@PathVariable("name") String name) {// 将这个添加到动态定时任务中去if (!dynamicTask.stop(name)) {return "停止失败,任务已在进行中.";}return "任务已停止";}@GetMapping("/getArea")public Map<String, Object> getAnnounce() {return new R().ok().add("rows", publicService.getArea()).builder();}@PostMapping("/getAreaSeats")public Map<String, Object> getAreaSeats(@RequestBody Map<String, Object> map) {List<Map<String, Object>> areaSeats = publicService.getAreaSeats(map);for (Map<String, Object> areaSeat : areaSeats) {areaSeat.put("show", false);}return new R().ok().add("rows", areaSeats).builder();}@PostMapping("/upPwd")public Map<String, Object> updatePwd(@RequestBody Map<String, Object> map) {Long number = new Long(map.get("number").toString());if (publicService.getUserByNumber(number).getPassword().equals(map.get("opassword"))) {publicService.updatePwd(map.get("npassword").toString(), number);return new R().ok().builder();} else {return new R().bad().builder();}}@PostMapping("/register")public Map<String, Object> register(@RequestBody MyUser user) {try {publicService.insertUser(user);return new R().ok().builder();} catch (Exception e) {return new R().bad().builder();}}@PostMapping("/login")public Map<String, Object> login(@RequestBody MyUser user, HttpServletRequest request) {try {MyUser resultUser = publicService.getUserByNumber(user.getNumber());System.out.println(resultUser);if (resultUser.getPassword().equals(user.getPassword())) {request.getSession().setAttribute("user", resultUser);return new R().ok().add("user", resultUser).builder();} else {throw new Exception();}} catch (Exception e) {return new R().bad().builder();}}
}
- Python项目实战-代码参考:
def index(request):if request.method in ["GET", "POST"]:msg = {"code": 200, "msg": "success", "data": []}print("=================>index")# allModels = apps.get_app_config('main').get_models()# for m in allModels:# print(m.__tablename__)# print(dir(m))# # for col in m._meta.fields:# # print("col name============>",col.name)# # print("col type============>",col.get_internal_type())# print(allModels)return JsonResponse(msg)def test(request, p1):if request.method in ["GET", "POST"]:msg = {"code": 200, "msg": "success", "data": []}print("=================>index ", p1)return JsonResponse(msg)def null(request,):if request.method in ["GET", "POST"]:msg = {"code": 200, "msg": "success", "data": []}return JsonResponse(msg)def check_suffix(filelName,path1):try:image_data = open(path1, "rb").read()except:image_data = "no file"if '.js' in filelName:return HttpResponse(image_data, content_type="application/javascript")elif '.jpg' in filelName or '.jpeg' in filelName or '.png' in filelName or '.gif' in filelName:return HttpResponse(image_data, content_type="image/png")elif '.css' in filelName:return HttpResponse(image_data, content_type="text/css")elif '.ttf' in filelName or '.woff' in filelName:return HttpResponse(image_data, content_type="application/octet-stream")elif '.mp4' in filelName:return HttpResponse(image_data, content_type="video/mp4")elif '.mp3' in filelName:return HttpResponse(image_data, content_type="audio/mp3")elif '.csv' in filelName:return HttpResponse(image_data, content_type="application/CSV")elif '.doc' in filelName:return HttpResponse(image_data, content_type="application/msword")elif '.docx' in filelName:return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.wordprocessingml.document")elif '.xls' in filelName:return HttpResponse(image_data, content_type="application/vnd.ms-excel")elif '.xlsx' in filelName:return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")elif '.ppt' in filelName:return HttpResponse(image_data, content_type="application/vnd.ms-powerpoint")elif '.pptx' in filelName:return HttpResponse(image_data, content_type="application/vnd.openxmlformats-officedocument.presentationml.presentation")elif '.zip' in filelName:return HttpResponse(image_data, content_type="application/x-zip-compressed")elif '.rar' in filelName:return HttpResponse(image_data, content_type="application/octet-stream")else:return HttpResponse(image_data, content_type="text/html")def admin_lib2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_lib3(request, p1, p2, p3):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p3:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p3:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p3 or '.woff' in p3:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p3:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p3:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_lib4(request, p1, p2, p3, p4):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/lib/", p1, p2, p3, p4)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p4:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p4:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p4 or '.woff' in p4:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p4:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p4:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_page(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_page2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/page/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_pages(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_pages2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/pages/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_file1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_file2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2)if not os.path.isfile(path1):path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_file3(request, p1, p2, p3):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3)if not os.path.isfile(path1):path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p3:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p3:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p3 or '.woff' in p3:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p3:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p3:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def admin_file4(request, p1, p2, p3, p4):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/admin/", p1, p2, p3, p4)if not os.path.isfile(path1):path1 = os.path.join(os.getcwd(), "templates/front/admin/dist/", p1, p2,p3,p4)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p4:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p4:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p4 or '.woff' in p4:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p4:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p4:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def front_pages(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def front_pages2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def layui1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def layui2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2)print("layui2 path1========================>",path1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def layui3(request, p1, p2, p3):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3)print("layui3 path1========================>",path1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)## try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p3:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p3:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p3 or '.woff' in p3:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p3:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p3:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def layui4(request, p1, p2, p3, p4):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/layui/", p1, p2, p3, p4)print("layui4 path1========================>",path1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p4:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p4:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p4 or '.woff' in p4:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p4:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p4:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def pages1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def pages2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/pages/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def front_file1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def front_file2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def schema_front1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def schema_front2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def schema_front3(request, p1, p2, p3):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p3:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p3:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p3 or '.woff' in p3:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p3:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p3:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def schema_front4(request, p1, p2, p3, p4):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/", p1, p2, p3, p4)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p4:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p4:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p4 or '.woff' in p4:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p4:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p4:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def assets1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# elif '.map' in p1:# return JsonResponse({})# else:# return HttpResponse(image_data, content_type="text/html")def assets2(request, p1, p2):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p2:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p2 or '.jpeg' in p2 or '.png' in p2 or '.gif' in p2:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p2:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p2 or '.woff' in p2:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p2:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p2:# return HttpResponse(image_data, content_type="audio/mp3")# elif '.map' in p2:# return JsonResponse({})# else:# return HttpResponse(image_data, content_type="text/html")def assets3(request, p1, p2, p3):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p3:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p3 or '.jpeg' in p3 or '.png' in p3 or '.gif' in p3:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p3:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p3 or '.woff' in p3:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p3:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p3:# return HttpResponse(image_data, content_type="audio/mp3")# elif '.map' in p3:# return JsonResponse({})# else:# return HttpResponse(image_data, content_type="text/html")def assets4(request, p1, p2, p3, p4):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/assets/", p1, p2, p3, p4)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p4:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p4 or '.jpeg' in p4 or '.png' in p4 or '.gif' in p4:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p4:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p4 or '.woff' in p4:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p4:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p4:# return HttpResponse(image_data, content_type="audio/mp3")# elif '.map' in p4:# return JsonResponse({})# else:# return HttpResponse(image_data, content_type="text/html")def css1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/css/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def js1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/js/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")def img1(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/img/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)# try:# image_data = open(path1, "rb").read()# except:# image_data="no file"# if '.js' in p1:# return HttpResponse(image_data, content_type="application/javascript")# elif '.jpg' in p1 or '.jpeg' in p1 or '.png' in p1 or '.gif' in p1:# return HttpResponse(image_data, content_type="image/png")# elif '.css' in p1:# return HttpResponse(image_data, content_type="text/css")# elif '.ttf' in p1 or '.woff' in p1:# return HttpResponse(image_data, content_type="application/octet-stream")# elif '.mp4' in p1:# return HttpResponse(image_data, content_type="video/mp4")# elif '.mp3' in p1:# return HttpResponse(image_data, content_type="audio/mp3")# else:# return HttpResponse(image_data, content_type="text/html")
def front_modules(request, p1):if request.method in ["GET", "POST"]:fullPath = request.get_full_path()print("{}=============>".format(sys._getframe().f_code.co_name), fullPath)path1 = os.path.join(os.getcwd(), "templates/front/modules/", p1)return check_suffix(eval(eval(sys._getframe().f_code.co_name).__code__.co_varnames[-3]),path1)
五、论文参考
- 计算机毕业设计选题推荐-自习室座位预约系统-论文参考:
六、系统视频
- 自习室座位预约系统-项目视频:
计算机毕业设计选题推荐-自习室座位预约系统-项目实战
结语
计算机毕业设计选题推荐-自习室座位预约系统-Java/Python项目实战
大家可以帮忙点赞、收藏、关注、评论啦~
源码获取:⬇⬇⬇
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目
相关文章:

计算机毕业设计选题推荐-自习室座位预约系统-Java/Python项目实战
✨作者主页:IT毕设梦工厂✨ 个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。 ☑文末获取源码☑ 精彩专栏推荐⬇⬇⬇ Java项目 Py…...

android13 删除兼容性警告窗口 deprecation warning 去除弃用警告
总纲 android13 rom 开发总纲说明 目录 1.前言 2.情况 3.问题分析 4.代码更改 5.编译测试 6.彩蛋 1.前言 在 Android 13 中,为了提高用户体验和应用的兼容性,系统引入了一些新的隐私和安全特性。这些特性可能会影响旧版应用的行为,因此当用户运行可能不完全兼容 An…...

JESD204B/C协议学习笔记
JESD204B基础概念 204B包含传输层,链路层,物理层。 应用层是对 JESD204B 进行配置的接口,在标准协议中是不含此层,只是为了便于理解,添加的一个层。 协议层指工程中生成的IP核JESD204B,负责处理输入的用户…...

网络安全-渗透测试工具及插件介绍和使用方法
1、Burp Suite Burp Suite 是用于攻击web 应用程序的集成平台。 是一款广泛使用的网络安全工具套件,主要用于测试Web应用程序的安全性。它可以帮助安全研究人员、渗透测试人员和开发人员发现和利用Web应用程序中的安全漏洞。 (1)下载和安装&a…...

JAVA WEB初步实验
Spring应用开发环境准备 安装配置Spring应用开发环境 熟悉IntelliJ IDEA开发工具 打开idea工具,创建普通Java工程 配置普通Java工程运行环境 得到基本的Java运行环境配置正常 修改pom.xml文件,搭建Spring IOC运行环境 更新pom文件 新建User、TestSpr…...
30 个 JavaScript 技巧,让你的代码更具可读性
1 、使用 !! 转换为布尔值 使用双重否定快速将任何值转换为布尔值。 let truthyValue !!1; // true let falsyValue !!0; // false 2 、 默认函数参数 设置函数参数的默认值以避免定义错误。 function greet(name "Guest") {return Hello, ${name}!; }greet(…...
电商行业中选择分账系统的关键因素!
分账是指将一笔交易的款项拆分成多个部分,按照预先设定的比例或规则分配给相关方。在电商行业中,分账通常是指将交易金额分给卖家、平台和其他相关方。 具体来说,分账可以帮助实现以下目标: 卖家结算:将顾客支付的货…...
通过继承实现状态模式(C++)
注意:先做类的声明和抽象基类的声明 抽象基类的函数方法中引入类,具体方法在类的实现后面声明。 在抽象基类的子类的函数中可以调用类的成员函数。 #include <iostream>using namespace std;class Contex;class state { public:virtual void Ha…...

全国多地公布2024下半年软考报名具体时间
下半年开考科目: 高级资格:系统分析师、系统架构设计师、网络规划设计师、系统规划与管理师 中级资格:软件设计师、网络工程师、信息安全工程师、信息系统监理师、多媒体应用设计师、系统集成项目管理工程师 初级资格:网络管理…...

【Python】requests的response.text 和 urllib.request 的 response.read()的区别
刚写代码的时候,我经常会把requests 和 urllib下的request 包搞混,这两个请求响应的方法看起来很相似,但是写获取的方法是不一样的。 前者requests 是用response.text 来获取源码,而 urllib.request是用 response.read() 来获取h…...

Obsidian插件安装与开发
大概背景 事情的起因还是因为做笔记,我喜欢利用插件Obsidian Git自动同步笔记到Gitee,写md文档有个问题就是关于图片如何存储。 我个人习惯是将所有图片都保存到指定的文件夹下,如图👇 由于Obsidian对粘贴图片默认格式为这样的&…...

lvs的dr模式实现
目录 一、实验环境准备 1、五台红帽9系统的主机 2、关闭所有的防火墙以及关闭selinux 二、在lvs中配置 1、在lvs中安装lvs软件并设置开机启动 2、在lvs中打开内核路由功能,并把它写入/etc/sysctl.conf文件中 3、webserver1和webserver2下载httpd 4、在lvs主机…...

免费写作神器,自动生成高质量文章
在当今数字化的时代,信息的传播和创作变得前所未有的重要。无论是企业的营销推广、个人的博客写作,还是学术研究报告,优质的文章都能发挥巨大的作用。而随着人工智能技术的飞速发展,免费的ai写作工具应运而生,为我们带…...
C#属性
属性(property)的概念是:它是一个方法或一对方法,在客户端代码看来,他(们)是一个字段。 下面把前面示例中变量名为_firstName的名字字段改为私有。FirstName属性包含get和set访问器,来检索和设置支持字段的…...
Spring的代理模式
目录 1、什么是代理模式? 2、为什么要用代理模式? 3、有哪几种代理模式? 4、静态代理 5、动态代理 (1)Proxy动态代理 (2)Enhancer动态代理 (3)dbUtil和动态代理的…...
el-table合计放在标题上方且合并列以及渲染后端返回的数据
el-table二次封装的父组件中的属性 <y-table :table-data"tableData" :table-model"tableModel" :isShowSummary"true" :getSummaries"getSummaries"></y-table>el-table合计放在标题上方 <style lang"scss"…...

magic-api相关应用与配置
目录 项目启动 工具:IDEA 运行项目 关于配置 项目启动 工具:IDEA 新建——》项目——》导入——》运行 运行项目 http://localhost:9999/magic/web/index.htmlhttp://localhost:9999/magic/web/index.html 关于配置 配置多数据源 在线配置多数据…...

AI大模型赋能开发者|海云安创始人谢朝海受邀在ISC.AI 2024大会就“大模型在软件开发安全领域的应用”主题发表演讲
近日,ISC.AI 2024 第十二届互联网安全大会在北京国家会议中心盛大开幕。作为全球规格最高、规模最大、影响力最深远的安全峰会之一,本次大会以“打造安全大模型 引领安全行业革命”为主题,聚焦安全与AI两大领域,吸引了众多行业领袖…...

基于Kahn算法|动态线程池,支持扩展点并发执行|召回|过滤
背景 在《分布式领域扩展点设计稿》一文中,我们提到针对业务横向扩展点和纵向扩展点的编排能力。 那有这样的一种场景:针对于一次会话,同时会调很多外部服务,同时这些RPC服务会有多种直接或间接的关系,是否有更高效的…...
Bootstrap 4 表头固定,tbody滚动条
表格 <div class"row" style"background-color: #fff;overflow: auto;max-height: 500px;"> <table class"table table-striped table-bordered scrolltable text-nowrap"> <thead> …...

详解ZYNQ中的 RC 和 EP
详解ZYNQ中的 RC 和 EP 一、ZYNQ FPGA 开发板基础( ZC706 ) 1. 核心特点 双核大脑 灵活积木: ZC706 集成了 ARM Cortex-A9 双核处理器(相当于电脑 CPU)和 FPGA 可编程逻辑单元(相当于可自定义的硬件积木…...
ubuuntu24.04 编译安装 PostgreSQL15.6+postgis 3.4.2 + pgrouting 3.6.0 +lz4
文章目录 下载基础包下载源码包编译 PG编译 postgis编译安装 pgrouting下载源码包配置编译参数编译安装 初始化数据库建表并检查列是否使用了 lz4 压缩算法检查 postgis 与 pgrouting 是否可以成功创建 下载基础包 sudo apt update && sudo apt upgrade -y sudo apt i…...
uni-app学习笔记三十--request网络请求传参
request用于发起网络请求。 OBJECT 参数说明 参数名类型必填默认值说明平台差异说明urlString是开发者服务器接口地址dataObject/String/ArrayBuffer否请求的参数App 3.3.7 以下不支持 ArrayBuffer 类型headerObject否设置请求的 header,header 中不能设置 Refere…...

【基于阿里云搭建数据仓库(离线)】使用UDTF时出现报错“FlatEventUDTF cannot be resolved”
目录 问题: 可能的原因有: 解决方法: 问题: 已经将包含第三方依赖的jar包上传到dataworks,并且成功注册函数,但是还是报错:“FlatEventUDTF cannot be resolved”,如下:…...

Digital IC Design Flow
Flow介绍 1.设计规格 架构师根据市场需求制作算法模型(Algorithm emulation)及芯片架构(Chip architecture),确定芯片设计规格书(Chip design specification) 原型验证 原型验证(Prototype Validation)通常位于产品开发流程的前期阶段,主要是在设计和开发的初步阶…...
上位机知识篇---Flask框架实现Web服务
本文将简单介绍Web 服务与前端显示部分,它们基于Flask 框架和HTML/CSS/JavaScript实现,主要负责将实时视频流和检测结果通过网页展示,并提供交互式状态监控。以下是详细技术解析: 一、Flask Web 服务架构 1. 核心路由设计 app.…...
Mac版Visual Studio Code Copilot 无法使用的解决方法
1 app文件夹删除Visual Studio Code 2 终端里面 输入以下指令,删除各种缓存 rm -fr ~/Library/Preferences/com.microsoft.VSCode.helper.plist rm -fr ~/Library/Preferences/com.microsoft.VSCode.plist rm -fr ~/Library/Caches/com.microsoft.VSCode rm -f…...
word操作(持续更新)
1、图片前面(无间隔格式),有像标题标记一样的黑点 word段落左边的黑色小方块小黑点是什么(段落的换行和分页属性)_哔哩哔哩_bilibili...
基于sqlite的任务锁(支持多进程/多线程)
前言 介绍 任务锁,在多进程服务间控制耗时任务的锁,确保相同id的耗时任务同时只有一个在执行 依赖 SqliteOp,参考这篇文章 https://blog.csdn.net/weixin_43721000/article/details/137019125 实现方式 utils/taskLock.py import timefrom utils.SqliteOp import Sqli…...

Docker 部署 Python 的 Flask项目
文章目录 一、构建运行 Docker 容器1. 查找合适镜像2.本地docker 拉取镜像3.项目配置1. python项目下生成 requirements.txt 依赖文件2. 生成Dockerfile文件3.忽略不必要文件4. 构建镜像 4. 运行容器5.测试 二、常见问题与解决方案 一、构建运行 Docker 容器 1. 查找合适镜像 …...