 Django、Vue 和Element UI 前后端原理论述测试天地》七十四 www.51testing.com 后端开发(Django+Rest Framework+MySQL): Django 负责处理 HTTP 请求和响应,以及 URL 路由的配置。它接收来自前端的 HTTP 请求,并根据 URL 将请求分发给相应的视图函数进行处理。 Rest Framework 是 Django 的扩展,用于快速构建 RESTful API 接口。通过 Rest 组件库,提供了丰富的预定义组件,用于快速搭建 美观的用户界面。 前后端交互: 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 总体而言,这种前后端分离的开 API 请求,并返回适当的响应。包括基于 函数的视图和基于类的视图,还有通用视图和视图集等。 路由:DRF 提供了灵活的路由功能,用于将 API 请求映射到相应的视图处理函数上。 认证和权限:DRF 支持各种认证和权限控制方式,可以保护 API 的安全性。 分页和过滤:DRF 提供了分页和过滤功能,便于处理大量数据和筛选查询结果。 强大的请求和响应处理:DRF 支持各种数据格式的请求和响应处理,包括0 码力 | 61 页 | 6.84 MB | 1 年前3 Django、Vue 和Element UI 前后端原理论述测试天地》七十四 www.51testing.com 后端开发(Django+Rest Framework+MySQL): Django 负责处理 HTTP 请求和响应,以及 URL 路由的配置。它接收来自前端的 HTTP 请求,并根据 URL 将请求分发给相应的视图函数进行处理。 Rest Framework 是 Django 的扩展,用于快速构建 RESTful API 接口。通过 Rest 组件库,提供了丰富的预定义组件,用于快速搭建 美观的用户界面。 前后端交互: 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 总体而言,这种前后端分离的开 API 请求,并返回适当的响应。包括基于 函数的视图和基于类的视图,还有通用视图和视图集等。 路由:DRF 提供了灵活的路由功能,用于将 API 请求映射到相应的视图处理函数上。 认证和权限:DRF 支持各种认证和权限控制方式,可以保护 API 的安全性。 分页和过滤:DRF 提供了分页和过滤功能,便于处理大量数据和筛选查询结果。 强大的请求和响应处理:DRF 支持各种数据格式的请求和响应处理,包括0 码力 | 61 页 | 6.84 MB | 1 年前3
 Django 官方教程翻译项目,为知识的传承献上您的一份力量! 如果当前文档生成时间太久,请到 书栈(BookStack.CN) 获取最新的文档,以跟上知识更新换 代的步伐。 文档地址:http://www.bookstack.cn/books/Django-intro-zh 书栈官网:http://www.bookstack.cn 书栈开源:https://github.com/TruthHun 分享,让知识传承更久远! 感谢知识 中的参数值。当一个用户请求页面时,Django 会顺序遍历这些匹配模式,直至模式和请求的 URL 成功匹配。(如果全部模式都无法匹配,Django 会返回一个404视图。)这个过程会在瞬间完成, 因为这些正则表达式在启动时就被编译了。 一旦其中一个正则表达式匹配成功,Django 就会导入并调用指定的视图——那是一个简单的 Python 函数。视图会被传进一个请求(requeset)对象 ——其中包含了请求元数据——和正则表达式匹配到的 那些参数值。 比如,如果用户请求了“/articles/2005/05/39323/”这样的 URL,Django 就会这样调用函 数:news.views.article_detail(request, ‘2005’, ‘05’, ‘39323’)。 视图函数的执行结果只可能有两种:返回一个包含请求页面内容的 HttpResponse 对象;或者是抛0 码力 | 103 页 | 1.86 MB | 1 年前3 Django 官方教程翻译项目,为知识的传承献上您的一份力量! 如果当前文档生成时间太久,请到 书栈(BookStack.CN) 获取最新的文档,以跟上知识更新换 代的步伐。 文档地址:http://www.bookstack.cn/books/Django-intro-zh 书栈官网:http://www.bookstack.cn 书栈开源:https://github.com/TruthHun 分享,让知识传承更久远! 感谢知识 中的参数值。当一个用户请求页面时,Django 会顺序遍历这些匹配模式,直至模式和请求的 URL 成功匹配。(如果全部模式都无法匹配,Django 会返回一个404视图。)这个过程会在瞬间完成, 因为这些正则表达式在启动时就被编译了。 一旦其中一个正则表达式匹配成功,Django 就会导入并调用指定的视图——那是一个简单的 Python 函数。视图会被传进一个请求(requeset)对象 ——其中包含了请求元数据——和正则表达式匹配到的 那些参数值。 比如,如果用户请求了“/articles/2005/05/39323/”这样的 URL,Django 就会这样调用函 数:news.views.article_detail(request, ‘2005’, ‘05’, ‘39323’)。 视图函数的执行结果只可能有两种:返回一个包含请求页面内容的 HttpResponse 对象;或者是抛0 码力 | 103 页 | 1.86 MB | 1 年前3
 django cms 2.2.x DocumentationPython [http://www.python.org] 2.5 (or a higher release of 2.x). Django [http://www.djangoproject.com] 1.2.5 (or a 1.3.x release). South [http://south.aeracode.org/] 0.7.2 or higher PIL [http://www.pythonware 0.4.2 or higher django-sekizai [https://github.com/ojii/django-sekizai] 0.4.2 or higher html5lib [http://code.google.com/p/html5lib/] 0.90 or higher An installed and working instance of one of the databases Django, South and django CMS globally, which is not recommended. We recommend you use virtualenv [http://www.virtualenv.org/] to use instead. If you chose to do so, install Django, django CMS and South0 码力 | 105 页 | 679.29 KB | 1 年前3 django cms 2.2.x DocumentationPython [http://www.python.org] 2.5 (or a higher release of 2.x). Django [http://www.djangoproject.com] 1.2.5 (or a 1.3.x release). South [http://south.aeracode.org/] 0.7.2 or higher PIL [http://www.pythonware 0.4.2 or higher django-sekizai [https://github.com/ojii/django-sekizai] 0.4.2 or higher html5lib [http://code.google.com/p/html5lib/] 0.90 or higher An installed and working instance of one of the databases Django, South and django CMS globally, which is not recommended. We recommend you use virtualenv [http://www.virtualenv.org/] to use instead. If you chose to do so, install Django, django CMS and South0 码力 | 105 页 | 679.29 KB | 1 年前3
 Django CMS 2.4.x DocumentationIntroductory Tutorial. Requirements Python [http://www.python.org] 2.5 (or a higher release of 2.x). Django [http://www.djangoproject.com] 1.4.5, 1.5 or higher South [http://south.aeracode.org/] 0.7.2 or higher compatibility issues) django-sekizai [https://github.com/ojii/django-sekizai] 0.7 or higher html5lib [http://code.google.com/p/html5lib/] 0.90 or higher django-i18nurls [https://github.com/brocaar/django-i18nurls] your database size to increase. Installing in a virtualenv using pip Installing inside a virtualenv [http://www.virtualenv.org] is the preferred way to install any Django installation. This should work on0 码力 | 156 页 | 727.78 KB | 6 月前3 Django CMS 2.4.x DocumentationIntroductory Tutorial. Requirements Python [http://www.python.org] 2.5 (or a higher release of 2.x). Django [http://www.djangoproject.com] 1.4.5, 1.5 or higher South [http://south.aeracode.org/] 0.7.2 or higher compatibility issues) django-sekizai [https://github.com/ojii/django-sekizai] 0.7 or higher html5lib [http://code.google.com/p/html5lib/] 0.90 or higher django-i18nurls [https://github.com/brocaar/django-i18nurls] your database size to increase. Installing in a virtualenv using pip Installing inside a virtualenv [http://www.virtualenv.org] is the preferred way to install any Django installation. This should work on0 码力 | 156 页 | 727.78 KB | 6 月前3
 Django 1.8.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2018 - 15:50:53 Django version 1.8, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. 16 Chapter 2. Getting started Django Documentation0 码力 | 1685 页 | 6.01 MB | 1 年前3 Django 1.8.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2018 - 15:50:53 Django version 1.8, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. 16 Chapter 2. Getting started Django Documentation0 码力 | 1685 页 | 6.01 MB | 1 年前3
 Django 1.8.x Documentationdatabases Tablespaces Database access optimization Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting the SECRET_KEY Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 2454 页 | 2.85 MB | 1 年前3 Django 1.8.x Documentationdatabases Tablespaces Database access optimization Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting the SECRET_KEY Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 2454 页 | 2.85 MB | 1 年前3
 Django 2.2.x DocumentationDatabase access optimization Database instrumentation Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting the Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 2915 页 | 2.83 MB | 1 年前3 Django 2.2.x DocumentationDatabase access optimization Database instrumentation Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting the Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 2915 页 | 2.83 MB | 1 年前3
 Django 2.1.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2019 - 15:50:53 Django version 2.1, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Note: Ignore the warning about unapplied database0 码力 | 1910 页 | 6.49 MB | 1 年前3 Django 2.1.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2019 - 15:50:53 Django version 2.1, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Note: Ignore the warning about unapplied database0 码力 | 1910 页 | 6.49 MB | 1 年前3
 Django 4.2.x Documentationoptimization Database instrumentation Fixtures Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting SECRET_KEY Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 3305 页 | 3.16 MB | 1 年前3 Django 4.2.x Documentationoptimization Database instrumentation Fixtures Examples of model relationship API usage Handling HTTP requests URL dispatcher Writing views View decorators File Uploads Django shortcut functions Generic Processing The condition decorator Shortcuts for only computing one value Using the decorators with other HTTP methods Comparison with middleware conditional processing Cryptographic signing Protecting SECRET_KEY Performance and optimization Introduction General approaches Caching Understanding laziness Databases HTTP performance Template performance Using different versions of available software Serializing Django0 码力 | 3305 页 | 3.16 MB | 1 年前3
 Django 4.0.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2023 - 15:50:53 Django version 4.0, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Note: Ignore the warning about unapplied database0 码力 | 2248 页 | 7.90 MB | 1 年前3 Django 4.0.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 3.3 Handling HTTP requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 3 HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Generally, a view retrieves data according to the parameters, loads a 2023 - 15:50:53 Django version 4.0, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. Note: Ignore the warning about unapplied database0 码力 | 2248 页 | 7.90 MB | 1 年前3
共 89 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9














