Shared study room reservation system based on Python Flask framework, dynamic seat selection, graduation project

Get resources at the end of the article, collect and follow them to avoid getting lost

Article directory

  • Preface
  • 1. Research background
  • 2. Research significance
  • 3. Mainly used technologies
  • 4. Research content
  • 5. Core code
  • 6. Article Table of Contents

Foreword

With the development of information technology, management systems are becoming more and more mature. Various enterprises and institutions use various types of management systems to improve work efficiency, thereby reducing the disadvantages of manual labor. Our government has always attached great importance to the development of education and encourages the development of various learning-related institutions. In addition, as employment pressure has gradually increased in recent years, various types of users have increasingly demanded shared study rooms. Therefore, there are some self-study rooms in the society that are convenient for studying. Managers hope to optimize the management plan by developing a shared self-study room reservation system, conduct comprehensive online management of study room information, and track the reservation status and usage of the study room through the system. It improves the work efficiency of study room managers, and also facilitates learners to quickly make online reservations and make reasonable use of study time.
The shared study room reservation system based on the Python Flask framework is a WeChat applet developed using the Python framework. The data is stored in MySQL, and PyCharm is used at the front desk to design and implement the interface. This article first fully investigates the demand analysis of the shared study room reservation system based on the Python Flask framework, deeply analyzes the functions that the system should have, and designs a complete database. Use mature development technology to complete the coding work, and finally conduct testing before investment. Finally, the front-end and back-end functions of the shared study room reservation system based on the Python Flask framework are completed, which mainly include user login module, reservation management module, study room management module, member management module, communication management module, system management module, usage order module Statistics, etc., realize data transmission through the front and backend.

1. Research background

Driven by information technology, it also affects the business activities of shared study rooms. In this era of information explosion and rapid development, no one lacks dreams, but they need a space to cultivate their dreams. Therefore, many shared study rooms have emerged in society, providing efficient and warm shared study rooms for dream chasers. As a popular place for learners, the self-study room gradually needs information management. It combines the type of study room, seating status, reservations, etc., and the shared study room reservation system can effectively integrate these contents. Improve study room utilization.
In addition, with the rapid development of communication technology and the continuous emergence of various new media, Python has become a new focus of public attention. Python is mature and stable. It is used to develop web management systems and has a wide user base. Both study room managers and learners hope to change inefficient reservation methods through effective technical means and conduct comprehensive online management through the management system. Administrators can fully grasp the status of the study room through the shared study room reservation system based on the Python Flask framework. Members can query study room information through the system and make online reservations. In the current severe stage of the epidemic, the management system can effectively reduce contact and improve one’s own safety.
In terms of technology, the back-end is developed using Python language, and the front-end is developed using HTML. These technologies can handle the business logic of the shared study room reservation system, facilitate user operation, and are simple to deploy. So it is suitable for the development of this project. In terms of database, choose the relational MySQL database, which is relatively mature and stable, open source and free, and has the characteristics of efficiency and simplicity.
With the current widespread development of the mobile Internet, you can easily participate in the system through your smartphone, and take advantage of the powerful advantages of WeChat applet to build a shared study room reservation system based on the Python Flask framework, which is more in line with the current level of informatization, no matter where it is. All kinds of users can log in through the browser to query or manage information, giving the user role a better experience.
The shared study room reservation system based on the Python Flask framework can achieve friendly interaction with users. It can fundamentally solve the problem of effective use of study room seat resources, improve the management of study room seats, and help administrators achieve unmanned The on-duty function improves management efficiency and also facilitates learners to arrange their time reasonably.

2. Research significance

In China, various learning-related systems have developed rapidly, from the initial single-chip computer processing era to the data comprehensive processing era to the current data system processing era. The rapid development of information technology has brought about qualitative changes in management systems. In the period of single-chip microcomputer processing, data storage was limited and the system efficiency was low. In the second period of data comprehensive processing, due to the low level of computer software and hardware and the high price, although the shared study room reservation system has been developed to a certain extent, it is limited by expensive equipment and cannot be fully popularized. In the current era of comprehensive data systems, distributed development technology, microservice technology, and database technology are gradually improving, and software equipment is cheap, driving all-round development and providing a foundation for the popularization of shared study room reservation systems. Compared with single-chip management systems and client-server model systems, the current light client model greatly reduces development costs and improves the efficiency of data management. Each client does not need to be installed separately and can be accessed through a browser.
Although there are currently self-study room operators developing self-study room query systems based on mobile platforms, they are basically a simple function migration from web pages to mobile clients, which can only meet simple query needs and do not take into account some details. needs. For example, the study room can only be reserved and cannot be settled. If the location and price of each study room can be known in real time, it will undoubtedly make it easier for learners to find study rooms and realize the rational use of study room resources.
In foreign countries, management systems developed earlier, various technologies are relatively mature, and they also have better compatibility and security for shared study room reservation systems. On the basis of information standards and specifications, various management systems can also meet customer requirements. For developed European and American countries, they use technical means and combine with advanced educational management models to develop management systems that are in line with the development of universities. At the same time, after years of exploration, they have formed a standardized and mature shared study room reservation system. In the United States, more than 85% of members check the status of the study room online and actively participate in the management system.

3. Mainly used technologies

environmental needs
1. Running environment: python3.7/python3.8.
2.IDE environment: pycharm + mysql5.7;
3. Database tool: Navicat11
4. Hardware environment: windows 7/8/10 1G memory or more; or Mac OS;
5. Database: MySql version 5.7;
technology stack
Backend: python + django
Front-end: vue + CSS + JavaScript + jQuery + elementui

Instructions for use
Use Navicat or other tools to create a database with the corresponding name in mysql and import the project’s sql file;
Use PyCharm to import the project, modify the configuration, and run the project;
Change the database configuration in the config.ini configuration file in the project to your own configuration, and then run;
After running successfully, enter in the browser: http://localhost:8080/project name

4. Research content






Member user functions include user login, viewing personal information, viewing announcements, viewing study rooms, online reservations, my orders, online communication, viewing announcements, and posting questions.

After the member user logs in, he can view the operation menu on the home page of the system to modify personal information and personal password. The functional process of modifying personal information and password is the same, both by first obtaining the personal information, then modifying it, and modifying it through the database. Statement update information.
The study room is under review. View all online study room information and then reserve a study room. After arriving on the reservation date, use the study room and end the use.
Communicate in the self-study room. In the self-study room, you can view the communication content of other members, reply to answers you are interested in, express your own opinions, and participate in discussions.
Check the announcements, check the notification information issued by the administrator, and learn the relevant announcement information in a timely manner.


Administrator management includes user login, member management, announcement management, study room management, appointment information management, order management, and system management.

Administrators need to log in first and obtain operation permissions before they can manage information. In this system, the administrator can log in to the server to manage users. The administrator adds member information, manages the basic information of members, and can also manage the study room information in the system. Administrators can issue announcements, formulate relevant systems, and add system notifications, all of which can be entered in the notification column, and the final added notification information is saved in the database.



5. Core code

# coding:utf-8
__author__ = "ila"

from django.http import JsonResponse

from .users_model import users
from util.codes import *
from util.auth import Auth
import util.message as mes


def users_login(request):
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->'code': normal_code, "msg": mes.normal_code}
        req_dict = request.session.get("req_dict")
        if req_dict.get('role')!=None:
            del req_dict['role']
        datas = users.getbyparams(users, users, req_dict)
        if not datas:
            msg['code'] = password_error_code
            msg['msg'] = mes.password_error_code
            return JsonResponse(msg)

        req_dict['id'] = datas[0].get('id')
        return Auth.authenticate(Auth, users, req_dict)


def users_register(request):
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->'code': normal_code, "msg": mes.normal_code}
        req_dict = request.session.get("req_dict")

        error = users.createbyreq(users, users, req_dict)
        if error != None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def users_session(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code,"msg":mes.normal_code, "data": {<!-- -->}}

        req_dict = {<!-- -->"id": request.session.get('params').get("id")}
        msg['data'] = users.getbyparams(users, users, req_dict)[0]

        return JsonResponse(msg)


def users_logout(request):
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->
            "msg": "Exit successfully",
            "code": 0
        }

        return JsonResponse(msg)


def users_page(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code, "msg": mes.normal_code,
               "data": {<!-- -->"currPage": 1, "totalPage": 1, "total": 1, "pageSize": 10, "list": []}}
        req_dict = request.session.get("req_dict")
        tablename = request.session.get("tablename")
        try:
            __hasMessage__ = users.__hasMessage__
        except:
            __hasMessage__ = None
        if __hasMessage__ and __hasMessage__ != "No":

            if tablename != "users":
                req_dict["userid"] = request.session.get("params").get("id")
        if tablename == "users":
            msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
            msg['data']['pageSize'] = users.page(users, users, req_dict)
        else:
            msg['data']['list'], msg['data']['currPage'], msg['data']['totalPage'], msg['data']['total'], \
            msg['data']['pageSize'] = [],1,0,0,10

        return JsonResponse(msg)


def users_info(request, id_):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code, "msg": mes.normal_code, "data": {<!-- -->}}

        data = users.getbyid(users, users, int(id_))
        if len(data) > 0:
            msg['data'] = data[0]
        # Browse clicks
        try:
            __browseClick__ = users.__browseClick__
        except:
            __browseClick__ = None

        if __browseClick__ and "clicknum" in users.getallcolumn(users, users):
            click_dict = {<!-- -->"id": int(id_), "clicknum": str(int(data[0].get("clicknum", 0)) + 1)}
            ret = users.updatebyparams(users, users, click_dict)
            if ret != None:
                msg['code'] = crud_error_code
                msg['msg'] = ret
        return JsonResponse(msg)


def users_save(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code, "msg": mes.normal_code, "data": {<!-- -->}}
        req_dict = request.session.get("req_dict")
        req_dict['role'] = 'Administrator'
        error = users.createbyreq(users, users, req_dict)
        if error != None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def users_update(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code, "msg": mes.normal_code, "data": {<!-- -->}}
        req_dict = request.session.get("req_dict")
        if req_dict.get("mima") and req_dict.get("password"):
            if "mima" not in users.getallcolumn(users,users):
                del req_dict["mima"]
            if "password" not in users.getallcolumn(users,users):
                del req_dict["password"]
        try:
            del req_dict["clicknum"]
        except:
            pass
        error = users.updatebyparams(users, users, req_dict)
        if error != None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)


def users_delete(request):
    '''
    '''
    if request.method in ["POST", "GET"]:
        msg = {<!-- -->"code": normal_code, "msg": mes.normal_code, "data": {<!-- -->}}
        req_dict = request.session.get("req_dict")

        error = users.deletes(users,
            users,
            req_dict.get("ids")
        )
        if error != None:
            msg['code'] = crud_error_code
            msg['msg'] = error
        return JsonResponse(msg)

6. Article directory

1System Overview 1
1.1 Research background 1
1.2 Research purpose 1
1.3 System design ideas 1
2Related technologies 3
2.1 MYSQL database 3
2.2 B/S structure 3
2.3 Introduction to Djangot framework 4
2.4 VUE Framework 4
3 System Analysis 5
3.1 Feasibility analysis 5
3.1.1 Technical feasibility 5
3.1.2 Economic feasibility 5
3.1.3 Operational feasibility 5
3.2 System performance analysis 6
3.2.1 System security 6
3.2.2 Data integrity 6
3.3 System interface analysis 6
3.4 System flow and logic 8
4System Outline Design 9
4.1 Overview 9
4.2 System structure 10
4.3. Database design 11
4.3.1 Database entities 11
4.3.2 Database design table 13
5 system detailed implementation 17
5.1 Implementation of the administrator module 17
5.2 Implementation of user module 19
6 System Test 21
6.1 Concept and meaning 21
6.2 Features 22
6.3 Importance 22
6.4 Test methods 23
6.5 Functional testing 23
6.6 Usability testing 24
6.7 Performance Test 24
6.8 Test Analysis 24
6.9 Test result analysis 25
Conclusion 25
Acknowledgments 26
Reference 26