 Django 官方教程翻译项目,为知识的传承献上您的一份力量! 如果当前文档生成时间太久,请到 书栈(BookStack.CN) 获取最新的文档,以跟上知识更新换 代的步伐。 文档地址:http://www.bookstack.cn/books/Django-intro-zh 书栈官网:http://www.bookstack.cn 书栈开源:https://github.com/TruthHun 分享,让知识传承更久远! 感谢知识 实例教程(zh)开始入手,或者直接开始阅读详细的参考文档。 Django 无需数据库就可以使用,它提供了对象关系映射器(ORM)。通过此技术,你可以使用 Python 代码来描述数据库结构。 数据模型语法提供了很多方法来描述你的数据,这解决了多年来在数据库模式中的难题。以下是一个 简明的例子: 1. # mysite/news/models.py 2. 3. from django.db import models 8. # 创建一个 Reporter 对象。 9. >>> r = Reporter(full_name='John Smith') 10. 11. # 将对象保存到数据库。save()方法需要被显式调用。 12. >>> r.save() 13. 14. # 现在它有了id。 15. >>> r.id 16. 1 17. 18. # 现在这个新人记者已经在数据库里了。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 分享,让知识传承更久远! 感谢知识 实例教程(zh)开始入手,或者直接开始阅读详细的参考文档。 Django 无需数据库就可以使用,它提供了对象关系映射器(ORM)。通过此技术,你可以使用 Python 代码来描述数据库结构。 数据模型语法提供了很多方法来描述你的数据,这解决了多年来在数据库模式中的难题。以下是一个 简明的例子: 1. # mysite/news/models.py 2. 3. from django.db import models 8. # 创建一个 Reporter 对象。 9. >>> r = Reporter(full_name='John Smith') 10. 11. # 将对象保存到数据库。save()方法需要被显式调用。 12. >>> r.save() 13. 14. # 现在它有了id。 15. >>> r.id 16. 1 17. 18. # 现在这个新人记者已经在数据库里了。0 码力 | 103 页 | 1.86 MB | 1 年前3
 Django、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 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 总体而言 7 《51 测试天地》七十四 www.51testing.com 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 ·后端搭建流程0 码力 | 61 页 | 6.84 MB | 1 年前3 Django、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 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 总体而言 7 《51 测试天地》七十四 www.51testing.com 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 ·后端搭建流程0 码力 | 61 页 | 6.84 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














