|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
网页上有两个div ;
第一个是查询和写入数据库的;
第二个div 是想用来单独查询的;
后端代码如图;, 红框的为第二个div 想实物的功能代码;
如果把这两个div 分开不同的页面展示 没有问题,
但如果想两个div 放在同一个页面时,就会报错, 连第一个写入数所的, 点击提交后就会报错,且写不进数据 库;
Traceback (most recent call last):
File "C:\Users\handsome\AppData\Local\Programs\Python\Pytho
response = get_response(request)
File "C:\Users\handsome\AppData\Local\Programs\Python\Pytho
response = self.process_exception_by_middleware(e, reques
File "C:\Users\handsome\AppData\Local\Programs\Python\Pytho
response = wrapped_callback(request, *callback_args, **ca
File "F:\webserver\inshop\views.py", line 46, in insert_db
select_result = Employee.objects.get(id=id_num)
File "C:\Users\handsome\AppData\Local\Programs\Python\Pytho
return getattr(self.get_queryset(), name)(*args, **kwargs
File "C:\Users\handsome\AppData\Local\Programs\Python\Pytho
raise self.model.DoesNotExist(
inshop.models.Employee.DoesNotExist: Employee matching query
[06/Aug/2020 17:47:07] "POST /handle_db/ HTTP/1.1" 500 77779 |
-
-
|