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

作者主页 :IT毕设梦工厂✨

个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。

☑文末获取源码☑
精彩专栏推荐 ⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目

文章目录

一、前言

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

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

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

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

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

二、开发环境

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

三、系统界面展示

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

四、部分代码设计

  • Java项目实战-代码参考:
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();
    }
}
java(贴上部分代码) 复制代码
@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项目实战-代码参考:
java(贴上部分代码) 复制代码
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项目
安卓项目
微信小程序项目

相关推荐
PieroPc几秒前
Python 写的 智慧记 进销存 辅助 程序 导入导出 excel 可打印
开发语言·python·excel
xlsw_3 小时前
java全栈day20--Web后端实战(Mybatis基础2)
java·开发语言·mybatis
神仙别闹4 小时前
基于java的改良版超级玛丽小游戏
java
梧桐树04294 小时前
python常用内建模块:collections
python
Dream_Snowar4 小时前
速通Python 第三节
开发语言·python
黄油饼卷咖喱鸡就味增汤拌孜然羊肉炒饭4 小时前
SpringBoot如何实现缓存预热?
java·spring boot·spring·缓存·程序员
暮湫5 小时前
泛型(2)
java
超爱吃士力架5 小时前
邀请逻辑
java·linux·后端
南宫生5 小时前
力扣-图论-17【算法学习day.67】
java·学习·算法·leetcode·图论
转码的小石5 小时前
12/21java基础
java