当前位置:网站首页>Error reporting: when the browser clicks the modify add button, there is no response and no error reporting. Solution
Error reporting: when the browser clicks the modify add button, there is no response and no error reporting. Solution
2022-07-29 00:48:00 【:D...】
Pictured Clicking both buttons at the same time does not respond 
Ideas
Both modification and addition involve the data of model classes
1 Find add Or modified Back end code And Model class See if it existsForeign key field
2 There are foreign key fields Determine whether the front end uses the data of this field
3 If the data of the foreign key field is used Determine whether the method of obtaining foreign key field data is definedPager
4 If a pager is defined , In the modify and add buttons , Get theThe data is incomplete
terms of settlement
Define a separate view to get foreign key field information
You can use subviews ListAPIView
Modify the route for the front end to obtain foreign key fields
Example
# SKU View set
class SKUViewSet(ModelViewSet):
queryset = Good.objects.all()
serializer_class = Good_Serializer
lookup_field = 'pk'
lookup_url_kwarg = 'pk'
pagination_class = Page
# Get all SKU Do not inherit the pager
class SKUList(ListAPIView):
queryset = Good.objects.all()
serializer_class = Good_Serializer
边栏推荐
- 芯驰科技发布G9系列最新旗舰产品,配备6个1.8Ghz主频的A55核心
- Several methods of multi-threaded sequential operation can be asked casually in the interview
- 110 MySQL interview questions and answers (continuously updated)
- Dynamic programming problem (VIII)
- requestVideoFrameCallback() 简单实例
- 直流无刷电机控制器(换电机霍尔收费多少)
- 17.机器学习系统的设计
- 17. Design of machine learning system
- Cause analysis of 12 MySQL slow queries
- Armeabi-v7a architecture (sv7a)
猜你喜欢

数仓搭建——DWT层

Some operations of Ubuntu remote server configuration database (unable to locate package MySQL server, steps of installing mysql, unable to enter password when logging in MySQL)

PTA (daily question) 7-75 how many people in a school

Nftscan and nftplay have reached strategic cooperation in the field of NFT data

17.机器学习系统的设计

聊聊异步编程的 7 种实现方式

requestVideoFrameCallback() 简单实例

110 MySQL interview questions and answers (continuously updated)

Flyway's quick start tutorial

What are the skills of API interface optimization?
随机推荐
Common measurement matrix and matlab code of compressed sensing
armeabi-v7a架构(sv7a)
The download file of native JS implementation can be used anywhere
Jupyter notebook中5个有趣的魔法命令
requestVideoFrameCallback() 简单实例
AQS原理
[basic course of flight control development 8] crazy shell · open source formation uav-i2c (laser ranging)
面试被问到了String相关的几道题,你能答上来吗?
Talk about seven ways to realize asynchronous programming
Router view cannot be rendered (a very low-level error)
Data warehouse construction - DWT floor
Brief introduction to compressed sensing
Introduction and solution of common security vulnerabilities in Web System SQL injection
第二轮1000个Okaleido Tiger,再次登录Binance NFT 1小时售罄
zabbix部署及监控
Basic knowledge of PHP language (super detailed)
SAP vl02n delivery note posting function WS_ DELIVERY_ UPDATE
Some operations of Ubuntu remote server configuration database (unable to locate package MySQL server, steps of installing mysql, unable to enter password when logging in MySQL)
Dynamic programming problem (3)
【愚公系列】2022年07月 Go教学课程 020-Go容器之数组