看网上封装了个MySQL的增删改查的类;所以想引入项目中(初学者。。。)

from django.contrib import auth
from django.shortcuts import render
from django.http import HttpResponseRedirect
from autotest.mysqlData import DataBaseHandle

# Create your views here.


# 登录界面
def index(request):
return render(request, 'index.html')

# 登录动作
def login_action(request):
# db = pymysql.connect(user='root', db='testplat', password='123456', host='127.0.0.1')
# cursor = db.cursor()
# sql1 = 'SELECT username FROM auth_user WHERE id = 1;'
# data1 = cursor.execute(sql1)
# name = [row[0] for row in cursor.fetchmany(data1)][0]
# sql2 = 'SELECT password FROM auth_user WHERE id = 1;'
# data2 = cursor.execute(sql2)
# pwd = [row[0] for row in cursor.fetchmany(data2)][0]
DbHandle = DataBaseHandle('127.0.0.1', 'root', '123456', 'testplat', 3306)
data = DbHandle.selectDb('SELECT username,password FROM auth_user WHERE id = 1;')
for row in data:
name = row[0]
pwd = row[1]
if request.method == 'POST':
# username = password = ''
username = request.POST.get('username', '')
password = request.POST.get('password', '')
user = auth.authenticate(username=username, password=password)
print("username:", username)
print("username:", name)
print("password:", password)
print("password:", pwd)
if username == name and password == pwd:
return HttpResponseRedirect("/login_success/")
else:
return render(request, 'index.html', {'error': 'username or password error'})


# 登录成功后跳转
def login_success(request):
return render(request, 'login_success.html')


运行就会报错:  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed

  File "E:\testPlatform\autotest\autotest\urls.py", line 19, in <module>

    from apitest import views

  File "E:\testPlatform\autotest\apitest\views.py", line 4, in <module>

    from autotest.mysqlData import DataBaseHandle

ModuleNotFoundError: No module named 'autotest.mysqlData'

请问有没有大神帮忙解决下?