[英]Do I need to use REST framework on Django?
Do I need to use the REST framework on Django, if I were to use a front-end framework such as React and database engine such as MongoDB or PostgreSQL? Do I need to use the REST framework on Django, if I were to use a front-end framework such as React and database engine such as MongoDB or PostgreSQL? I also don't fully understand what a REST framework is.
我也不完全理解 REST 框架是什么。
No. You don't have to, django is able to process requests, and manage database connections by itself.不,您不必这样做,django 能够自行处理请求并管理数据库连接。 You could build a complete API without using django rest framework at all, that could do anything that you could do with django rest framework.
You could build a complete API without using django rest framework at all, that could do anything that you could do with django rest framework.
But.但。 DRF adds a lot of stuff that would make developing such a back-end alot faster.
DRF 添加了很多东西,可以更快地开发这样的后端。 It has lots of features that make building common use cases quick, such as serializing/deserialzing requests, CRUD operations etc. Django can also do some of this, but DRF is specifically designed for building out an API.
它有许多可以快速构建常见用例的功能,例如序列化/反序列化请求、CRUD 操作等。Django 也可以做到这一点,但 DRF 专为构建 API 而设计。
REST refers to a RESTful API. REST 指的是 RESTful API。 SO DRF is a framework that is useful for building restful APIs.
SO DRF 是一个可用于构建 RESTful API 的框架。 What a restful API is, is a fairly big question in and of itself.
多么宁静的 API 本身就是一个相当大的问题。 It stands for REpresentational State Transfer, but could best be described better than I can do here.
它代表 REpresentational State Transfer,但最好比我在这里做的更好。 Maybe checkout this answer here: What is REST?
也许在这里查看这个答案: 什么是 REST? Slightly confused
有点困惑
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.