Python graduation design based on Django’s rural teacher teaching support system in remote areas

Get resources at the end of the article, collect and pay attention to not get lost

Article directory

  • 1. Project introduction
  • 2. Mainly used technologies
  • 3. Research content
  • 4. Core code
  • 5. Article Directory

1. Project introduction

The 21st century is already a digital society, an information society, and a society of network globalization. The current focus is mainly on the information industry, which plays a decisive role in the development of the country in the new century. have a great impact on development.
Now the traditional stand-alone system has completely withdrawn from the stage of the information age, and it is replaced by the network version system that can support the network and support a variety of data information, thus forming an all-information society. The formation of an information society,
Those outdated and inefficient office methods are threatened by this. If you want to manage information better, you should find a better management method.
Information has become another form of important resource in today’s society. At the same time, information is also the basic unit of enterprise management, and the status occupied by information is also very high.
This support education management information system uses IT technology for the management of support education information. It mainly collects and stores a series of information formed by support education, and provides an interface for updating and retrieving support education information;
In this way, the efficiency of teaching volunteer service will be greatly improved.

Roles: Teacher, School, Administrator
The front desk should include: home page, teaching positions, volunteer teachers, teacher sharing, announcement information, platform introduction, personal center

1. Home page: display the supporting teaching positions, volunteer teachers, teacher sharing, and announcement information on the navigation bar and click to view them.

2. Supporting education positions, according to the needs of different types of positions, select such as winter and summer vacation support education, short-term support education, etc. to browse support education positions.
Click to view job details; school pictures, names, job descriptions, etc.: Comments are available on the job interface; only teachers who have participated in the job can write comments;.

After logging in, you can apply for a job. When a teacher submits an application for a job, you need to fill in your personal information and upload your resume. The resume will be uploaded to the background administrator for review. Whether you pass or not, you must send an information reply to the teacher; send it by email; and reflect it in the teacher’s application status.
3. Volunteer teacher
Including the profile picture and profile of the volunteer teacher. Click to enter the volunteer teacher details page to follow.
4. Teacher sharing
Multiple shares are displayed in the form of text plus pictures. Click to enter the teacher’s share details interface, which can be articles, pictures, recorded videos, etc., and you can comment below. Click Reply to reply to comments; users who log in can comment; : You can like it.
5. Announcement information
Presented in the form of a title link; title: release time;, the details are mainly text-based, click into one of the announcements, in addition to text, some have file links below to download detailed files.
6. Platform introduction
The basic information of the platform, contact information, etc., can be presented in the form of an introduction.
7. Personal center
The school’s personal hub page:
Publish and manage.
Click Publish, fill in the post information to be released, and submit for release. Posted positions have a start time and an end time, and the service hours of volunteer teachers are counted according to this time.
Management: Published list, registered list, personal information management.

2. Main technologies used

environmental needs
1. Operating environment: python3.7/python3.8.
2.IDE environment: pycharm + mysql5.7;
3. Database tools: Navicat11
4. Hardware environment: Windows 7/8/10 with 1G memory or more; or Mac OS;
5. Database: MySql 5.7 version;
technology stack
Backend: python + django
Frontend: 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 sql file of the project;
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

3. Research content








4. 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 hits
        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)

5. Article directory

1 System Overview 1
1.1 Research Background 1
1.2 Research purpose 1
1.3 System Design Thought 1
2 related 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
4 System 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 Detailed implementation of the system 17
5.1 Implementation of the administrator module 17
5.2 Implementation of user modules 19
6 System Test 21
6.1 Concept and meaning 21
6.2 Features 22
6.3 Importance 22
6.4 Test method 23
6.5 Functional testing 23
6.6 Usability testing 24
6.7 Performance testing 24
6.8 Test Analysis 24
6.9 Analysis of test results 25
Conclusion 25
Acknowledgments 26
References 26