[英]django-rest-framework-datatables with Apache shows 414 URI too long error
Pre-requisites先决条件
I have a simple Rest API - which fetches all data from a table in Oracle database.我有一个简单的 Rest API - 它从 Oracle 数据库中的表中获取所有数据。 This Django Framework is hosted on Apache webserver.
这个 Django 框架托管在 Apache 网络服务器上。 This data is fed into a datatable using the django-rest-framework-datatables.
使用 django-rest-framework-datatables 将该数据输入到数据表中。
?format=datatables
as the query parameter the URL is changed and it becomes a very long URL since my table consists of 50-60 columns.?format=datatables
作为查询参数的模板获取数据时,URL 发生了变化,它变成了一个很长的 URL,因为我的表包含 50-60 列。 Did anybody else face this error?还有其他人遇到这个错误吗?
It works well with the django's inherent webserver but when used using Django fails.它适用于 django 的固有网络服务器,但在使用 Django 时会失败。
Django-rest-framework datatables also support POST requests which solves this particular problem of too long GET URIs, see: Django-rest-framework 数据表还支持 POST 请求,解决了 GET URI 过长的特殊问题,请参阅:
https://django-rest-framework-datatables.readthedocs.io/en/latest/tutorial.html#using-datatables-via-post-method https://django-rest-framework-datatables.readthedocs.io/en/latest/tutorial.html#using-datatables-via-post-method
and:和:
https://datatables.net/examples/server_side/post.html https://datatables.net/examples/server_side/post.html
Yes, I faced such issue and reconfigured the code to shorten the URI.是的,我遇到了这样的问题并重新配置了代码以缩短 URI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.