Django 官方教程翻译项目
,为知识的传承献上您的一份力量! 如果当前文档生成时间太久,请到 书栈(BookStack.CN) 获取最新的文档,以跟上知识更新换 代的步伐。 文档地址:http://www.bookstack.cn/books/Django-intro-zh 书栈官网:http://www.bookstack.cn 书栈开源:https://github.com/TruthHun 分享,让知识传承更久远! 感谢知识 article_detail(request, ‘2005’, ‘05’, ‘39323’)。 视图函数的执行结果只可能有两种:返回一个包含请求页面内容的 HttpResponse 对象;或者是抛 出 Http404 这类异常。至于视图接下来还要做什么则由你决定。 通常来说,一个视图的工作就是:从参数获取数据,加载模板,然后模板进行带数据的渲染。下面是 一个 year_archive 的视图例子: 快速安装指南 - 14 - 本文档使用 书栈(BookStack.CN) 构建 创建你的第一个 Django 项目, 第一部分 创建你的第一个 Django 项目, 第一部分 创建项目 用于开发的服务器 创建 Polls 投票应用 编写你的第一个视图 url 参数:regex url 参数:view url 参数:kwargs url 参数:name 来跟着实际项目学习 Django0 码力 | 103 页 | 1.86 MB | 1 年前3Django、Vue 和Element UI 前后端原理论述
《51 测试天地》七十四 www.51testing.com 后端开发(Django+Rest Framework+MySQL): Django 负责处理 HTTP 请求和响应,以及 URL 路由的配置。它接收来自前端的 HTTP 请求,并根据 URL 将请求分发给相应的视图函数进行处理。 Rest Framework 是 Django 的扩展,用于快速构建 RESTful API 接口。通过 组件库,提供了丰富的预定义组件,用于快速搭建 美观的用户界面。 前后端交互: 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 总体而言 测试天地》七十四 www.51testing.com 依赖包,这些依赖包通常存储在 package.json 文件中。 前端服务配置启动:在项目目录下执行 npm run serve 命令,启动前端开发服务器, 可以在浏览器中预览项目。 三、关键技术介绍 1、后端为什么要创建虚拟环境,创建虚拟环境可以达到什么效果? 隔离项目依赖:通过创建后端虚拟环境,每个项目都拥有独立的 Python 解释器和包0 码力 | 61 页 | 6.84 MB | 1 年前3django cms 2.2.x Documentation
Python [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 年前3Django CMS 2.4.x Documentation
Introductory 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 月前3Django 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 年前3Django 1.8.x Documentation
databases 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 年前3Django 2.2.x Documentation
Database 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 年前3Django 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 年前3Django 4.2.x Documentation
optimization 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 年前3Django 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