[英]Is django a restful api?
I am confused.我很迷惑。 Some say it is a Restful API and some say it is not.
有人说它是一个 Restful API,有人说它不是。
How do we define a RESTful API?我们如何定义 RESTful API? GET,PUT,POST and DELETE commands ?
GET、PUT、POST 和 DELETE 命令?
Can I call any web application which is built using django Web framework a Restful API?我可以将使用 django Web 框架构建的任何 Web 应用程序称为 Restful API 吗?
I am confused.我很迷惑。 Some say it is a Restful API and some say it is not.
有人说它是一个 Restful API,有人说它不是。
Two different kinds of Django:两种不同的 Django:
Django - a web application framework to rapidly develop web applications Django - 快速开发 Web 应用程序的 Web 应用程序框架
Django REST Framework (DRF) - a powerful framework to create RESTful APIs. Django REST Framework (DRF) - 创建 RESTful API 的强大框架。
Both framework are in Python.两个框架都在 Python 中。
How do we define a RESTful API?我们如何定义 RESTful API? GET,PUT,POST and DELETE commands ?
GET、PUT、POST 和 DELETE 命令?
You create an API on your backend application that defines its purpose.您在后端应用程序上创建一个 API 来定义其用途。 If you use DRF for example, and the URL of your API is yourdomain.com/customers/, you can have it to:
例如,如果您使用 DRF,并且您的 API 的 URL 是 yourdomain.com/customers/,您可以使用它:
Can I call any web application which is built using django Web framework a Restful API?我可以将使用 django Web 框架构建的任何 Web 应用程序称为 Restful API 吗?
You call it as backend你称之为后端
Django is a web framework to create web backend while REST (REpresentational State Transfer) is an architectural style for developing web services. Django 是一个用于创建 Web 后端的 Web 框架,而 REST(REpresentational State Transfer)是一种用于开发 Web 服务的架构风格。 You can use django to create REST apis.
您可以使用 django 来创建 REST api。 You can explore further here:
您可以在这里进一步探索:
Django: https://www.djangoproject.com/ Django: https : //www.djangoproject.com/
REST: https://youtu.be/llpr5924N7E休息: https : //youtu.be/llpr5924N7E
What I understood from the web is here:我从网上了解到的是:
api
in the URL.api
。 Can someone confirm it? And few more constraints to be a RESTful API.以及成为 RESTful API 的更多限制。 Hope all these points are correct.
希望所有这些观点都是正确的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.