计算机毕业设计选题推荐-自习室座位预约系统-Java/Python项目实战

news2024/9/29 13:31:51

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

文章目录

  • 一、前言
  • 二、开发环境
  • 三、系统界面展示
  • 四、部分代码设计
  • 五、论文参考
  • 六、系统视频
  • 结语

一、前言

在快节奏的学习和工作环境中,自习室成为学生和上班族寻求安静学习空间的重要场所。然而,随着用户数量的增加,自习室座位的供需矛盾日益突出。据统计,许多高校图书馆和自习室在考试季和高峰时段常常出现座位不足的现象,导致学生不得不提前数小时排队等候。此外,由于缺乏有效的座位管理系统,自习室内的座位占用效率并不理想,存在长时间占座却不定期使用的问题。因此,开发一个自习室座位预约系统,对于优化座位资源分配、提高自习室使用效率具有重要意义。

现有的自习室座位管理多采用先到先得的方式,缺乏有效的预约和监管机制。例如,一些自习室虽设有座位预约板,但信息更新不及时,且缺乏对预约行为的约束,导致预约系统形同虚设。此外,由于缺少在线管理平台,学生无法实时了解座位使用情况,难以做出合理的学习安排。还有自习室的公告和留言板管理也较为落后,信息传递效率低下,无法满足学生获取即时信息的需求。这些问题的存在,不仅影响了自习室座位的有效利用,也降低了学生的学习效率。

本课题旨在设计并实现一个便捷的自习室座位预约系统,通过在线预约、实时监管、信息发布等功能,解决现有自习室座位管理中存在的问题。系统将实现用户信息管理、座位状态实时更新、预约流程自动化、公告信息即时发布、留言板互动交流等功能,旨在提高自习室座位的利用率和学生的学习体验。

在自习室座位预约系统中,管理人员负责用户账户的创建与维护、座位信息的配置与管理、公告内容的发布与更新、留言板的监管与维护,确保系统信息的准确性和社区交流的秩序;学生用户则能够通过系统进行座位的预约与取消、查看公告信息、在留言板上发布和回复信息,享受便捷的座位预约服务和及时的交流体验。系统通过这些功能模块的整合,旨在提供一个便捷的自习室座位预约和管理平台。

本课题的研究具有重要的理论意义和实际意义。从理论角度来看,它为自习室座位管理提供了新的研究视角,即如何利用信息技术优化资源分配和管理流程。从实际角度来看,自习室座位预约系统的应用将显著提升自习室座位的使用效率,减少资源浪费,同时为学生提供更加便捷、舒适的学习环境。此外,系统的推广应用还将有助于培养学生的规则意识和时间管理能力,促进学习行为的规范化,提高学习效率。

二、开发环境

  • 开发语言:Java/Python
  • 数据库:MySQL
  • 系统架构:B/S
  • 后端:SpringBoot/SSM/Django/Flask
  • 前端:Vue

三、系统界面展示

  • 自习室座位预约系统界面展示:
    管理员-座位信息管理:
    管理员-座位信息管理管理员-公告管理:
    管理员-公告管理用户-留言:
    用户-留言用户-预约座位:
    用户-预约座位

四、部分代码设计

  • Java项目实战-代码参考:
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Resource
    AdminService 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 {
    @Resource
    PublicService publicService;
    @Resource
    UserService userService;


    private final DynamicTaskService dynamicTask;


    public PublicController(DynamicTaskService dynamicTask) {
        this.dynamicTask = dynamicTask;
    }

    {
        //启动项目,重启预约线程
        Timer timer = new Timer();
        TimerTask timerTask = new TimerTask() {
            @Override
            public 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
     */
    @GetMapping
    public 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项目
安卓项目
微信小程序项目

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1980355.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

GD32 MCU硬件I2C不可靠不如软件I2C?

在一个评论中&#xff0c;看到网友对硬件I2C的讨论&#xff0c;硬件I2C Busy找不到原因、软件I2C稳得一批。 那么为什么会出现I2C BUSY&#xff1f;硬件I2C真的不如软件I2C吗&#xff1f;怎么让硬件I2C也稳得一批&#xff0c;让我们来一探究竟。 首先我们从I2C时序分析下I2C总…

基于pytorch的steam游戏评分的线性回归问题分析

前言 相信已经暑假一个月的大家肯定并不陌生上面这个学习软件()&#xff0c;面对琳琅满目的游戏总是让人不知道挑选什么&#xff0c;这时候一个游戏的评分往往便成为了一个玩家选择下载的原因&#xff0c;那么今天我们就来研究研究&#xff0c;steam上一个游戏的种种数据&…

Celery注册装饰器@app.task和@shared_task

注册装饰器 app.task和shared_task是Celery中用于定义任务的两种不同装饰器, 它们之间存在明显的区别.from celery import Celery app Celery(my_app, brokeramqp://guestlocalhost//) app.task def my_task(): # 任务逻辑 passfrom celery import shared_task shared…

数据结构——双链表详解(超详细)

前言&#xff1a; 小编在之前已经写过单链表的创建了&#xff0c;接下来要开始双链表的讲解了&#xff0c;双链表比单链表要复杂一些&#xff0c;不过确实要比单链表更好进行实现&#xff01;下面紧跟小编的步伐&#xff0c;开启今天的双链表之旅&#xff01; 目录 1.概念和结构…

Pixart LED调变开发笔记

Pixart提供基础的鼠标和键盘代码, 开发者可以基于此快速的建置自己的firmware, application, 以下介绍代码中用来控制LED的API函式. 常亮模式 (Always on) 常亮模式, 调用API "pwm_led_set_always_on" 及 channel 来设置对应LED常亮. 闪烁模式 (Flash mode) 闪烁模…

华为OD机试 - 字符串编码校验(Java 2024 D卷 100分)

华为OD机试 2024D卷题库疯狂收录中&#xff0c;刷题点这里 专栏导读 本专栏收录于《华为OD机试&#xff08;JAVA&#xff09;真题&#xff08;D卷C卷A卷B卷&#xff09;》。 刷的越多&#xff0c;抽中的概率越大&#xff0c;私信哪吒&#xff0c;备注华为OD&#xff0c;加入华…

Unity3D 物体圆周运动

Unity3D 实现一个 2D 物体沿着圆周进行运动。 物体圆周运动 前段时间在开发一个小游戏时&#xff0c;需要实现火箭沿着一个圆形轨道进行圆周运动。 以前面试的时候也被问到过这类问题&#xff08;如何让一个 2D 物体做圆周运动&#xff09;&#xff0c;所以还是记录一下实现…

ICML 2024 | 矛与盾的较量!北大提出提示无关数据防御保护算法PID

文章链接&#xff1a;https://arxiv.org/pdf/2406.15305 代码地址&#xff1a;https://github.com/PKU-ML/Diffusion-PID-Protection 亮点直击 本文在实证观察中发现&#xff0c;保护阶段和利用阶段之间的提示不匹配可能会削弱当前数据保护算法的有效性。本文深入探讨了利用LDM…

【机器学习第7章——贝叶斯分类器】

机器学习第7章——贝叶斯分类器 7.贝叶斯分类器7.1贝叶斯决策论7.2 朴素贝叶斯分类器条件概率的m估计 7.3 极大似然估计优点基本原理 7.4 贝叶斯网络7.5 半朴素贝叶斯分类器7.6 EM算法7.7 EM算法实现 7.贝叶斯分类器 7.1贝叶斯决策论 一个医疗判断问题 有两个可选的假设&#…

从日常到专业,2024年必备在线翻译神器

现在全球交流越发的简单、频繁&#xff0c;很多时候外语成为了我们汲取新鲜知识的绊脚石。这时候我们就可以借助一些翻译在线的工具来解决这个问题。这次我们一起探索几款我搜集到的翻译工具。 1.福晰在线翻译 链接直通&#xff1a;https://fanyi.pdf365.cn/doc 这个工具支…

本地部署启动PmHub

文章目录 相关配置版本关系拉取代码使用Git clone下载源码 MYSQL配置Nacos配置Windows本地下载也可以Docker部署Nacos持久化配置启动Nacos访问Nacos Redis配置RocketMQ配置新建相应目录rocketmq, 然后在里面新建broker文件夹, 放broker.conf在 rocketmq 新建 data 文件夹&#…

MRAM FRAM在医疗设备场景的应用

便携式超声波扫描仪是一种检测从物体反射的声波并将其转换为实时图像的设备。通常使用配置存储器和图像/报告存储器两种类型的存储器。配置存储器存储来自外部硬件的标识和配置信息&#xff0c;图像/报告存储器存储图像和相应的报告数据。这些存储器即使在突然断电的情况下&…

MySQL介绍和安装与配置

文章目录 MySQL介绍什么是数据库什么是关系型数据库什么是非关系型数据库MySQL概述和历史 MySQL安装和配置在线安装方式MySQL5.7的安裝1.下载yum Repository2.安装yum Repository3.安装mysql5.7的服务3.后续命令 离线安装方式1、卸载已有的MySQL文件2、安装mysql3、后续命令 修…

详细分析Python生成项目依赖包的工具

目录 前言1. pipreqs2. pip freeze3. poetry4. conda5. 总结 前言 在Python项目开发中&#xff0c;管理依赖包是确保项目正常运行的关键步骤 本博客将详细分析几种流行的依赖管理工具&#xff0c;包括 pipreqs、pip freeze、poetry 和 conda&#xff0c;以及它们的使用场景和…

智能硬件创新实训平台-嵌入式、物联网、移动互联网、人工智能实验实训教学平台

智能硬件是继智能手机之后的一个科技概念&#xff0c;通过软硬件结合的方式&#xff0c;对传统设备进行改造&#xff0c;进而让其拥有智能化的功能。智能化之后&#xff0c;硬件具备连接的能力&#xff0c;实现互联网服务的加载&#xff0c;形成“云端”的典型架构&#xff0c;…

黑马Java零基础视频教程精华部分_11_面向对象进阶(3)_抽象类、接口、适配器

《黑马Java零基础视频教程精华部分》系列文章目录 黑马Java零基础视频教程精华部分_1_JDK、JRE、字面量、JAVA运算符 黑马Java零基础视频教程精华部分_2_顺序结构、分支结构、循环结构 黑马Java零基础视频教程精华部分_3_无限循环、跳转控制语句、数组、方法 黑马Java零基础视…

【Linux】文件变身大作战:Linux下的文件重命名艺术

欢迎来到 CILMY23 的博客 &#x1f3c6;本篇主题为&#xff1a;文件变身大作战&#xff1a;Linux下的文件重命名艺术 &#x1f3c6;个人主页&#xff1a;CILMY23-CSDN博客 &#x1f3c6;系列专栏&#xff1a;Python | C | C语言 | 数据结构与算法 | 贪心算法 | Linux | 算法…

OpenGL3.3_C++_Windows(33)

PBR渲染管线 Physically Based Rendering渲染管线 :使用一种更符合物理学规律的算法模型来模拟光线&#xff0c;由于它与物理性质非常接近&#xff0c;可以直接以物理参数为依据来编写表面材质判断是否基于物理的渲染,有三个数学模型&#xff1a;微平面&#xff0c;能量守恒&a…

Go语言实现支持泛型的二分查找算法

二分查找基本原理图&#xff1a; 参考代码&#xff1a; 泛型的定义&#xff1a; package v2024type Integer interface {int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 }type Float interface {float32 | float64 }type Number interface …