Django 官方教程翻译项目您想要马上开始一个项目,可以 从 实例教程(zh)开始入手,或者直接开始阅读详细的参考文档。 Django 无需数据库就可以使用,它提供了对象关系映射器(ORM)。通过此技术,你可以使用 Python 代码来描述数据库结构。 数据模型语法提供了很多方法来描述你的数据,这解决了多年来在数据库模式中的难题。以下是一个 简明的例子: 1. # mysite/news/models.py 2 6. full_name = models.CharField(max_length=70) 7. 8. def __str__(self): # Python 2 下请使用 __unicode__ 9. return self.full_name 10. 11. class Article(models.Model): 12 16. 17. def __str__(self): # Python 2 下请使用 __unicode__ 18. return self.headline 然后,运行 Django 命令行工具来创建数据库表。 1. $ python manage.py migrate migrate 命令会查找所有可用的模型,如果数据库中没有与之对应的表,则会为其自动创建。0 码力 | 103 页 | 1.86 MB | 1 年前3
Django、Vue 和Element UI 前后端原理论述UI 组件库,提供了丰富的预定义组件,用于快速搭建 美观的用户界面。 前后端交互: 后端通过 Django Rest Framework 提供 API 接口,前端通过 Vue 发起 HTTP 请求调用 这些 API 接口。 前端通过 HTTP 请求向后端发送数据请求,后端根据请求进行相应的数据处理,并 返回响应数据给前端。 前端接收到后端返回的数据,并根据数据更新页面展示,实现与用户的交互。 安装相关包->创建工程->后端依赖(pipenv)创建虚拟环境->后端服务配置启动->后 端创建子应用->后端 Rest Framework->数据库配置 简要说明: 安装相关包:在开始之前,首先需要安装 Python 和 pip,然后安装 Django 等相关包, 可以使用 pip 命令来安装。 创建工程:使用 Django 的命令行工具创建 Django 项目,例如:django-admin startproject Django 的 manage.py 启动服务,例如:python manage.py runserver。 后端创建子应用:根据项目的需要,可以创建多个子应用(app)来管理不同的功能 模块。 后端 Rest Framework:使用 Django Rest Framework 来构建 RESTful API,方便前端 和其他应用调用后端接口。 数据库配置:配置 Django 项目的数据库连接,通常使用0 码力 | 61 页 | 6.84 MB | 1 年前3
Django 5.1 DocumentationURLs Write your views Design your templates This is just the surface Quick install guide Install Python Set up a database Install Django Verifying That’s it! Writing your first Django app, part 1 Creating Installing some prerequisites Packaging your app Using your own package Publishing your app Installing Python packages with a virtual environment What to read next Finding documentation How the documentation Pushing the commit and making a pull request Next steps Using Django How to install Django Install Python Install Apache and mod_wsgi Get your database running Install the Django code Models and databases0 码力 | 3513 页 | 3.17 MB | 1 年前3
Django 5.1.2 DocumentationURLs Write your views Design your templates This is just the surface Quick install guide Install Python Set up a database Install Django Verifying That’s it! Writing your first Django app, part 1 Creating Installing some prerequisites Packaging your app Using your own package Publishing your app Installing Python packages with a virtual environment What to read next Finding documentation How the documentation Pushing the commit and making a pull request Next steps Using Django How to install Django Install Python Install Apache and mod_wsgi Get your database running Install the Django code Models and databases0 码力 | 3519 页 | 3.17 MB | 1 年前3
Django 5.0.x DocumentationURLs Write your views Design your templates This is just the surface Quick install guide Install Python Set up a database Install Django Verifying That’s it! Writing your first Django app, part 1 Creating Installing some prerequisites Packaging your app Using your own package Publishing your app Installing Python packages with a virtual environment What to read next Finding documentation How the documentation Pushing the commit and making a pull request Next steps Using Django How to install Django Install Python Install Apache and mod_wsgi Get your database running Install the Django code Models and databases0 码力 | 3407 页 | 3.21 MB | 1 年前3
Django 1.8.x DocumentationURLs Write your views Design your templates This is just the surface Quick install guide Install Python Set up a database Remove any old versions of Django Install Django Verifying That’s it! Writing Installing some prerequisites Packaging your app Using your own package Publishing your app Installing Python packages with virtualenv What to read next Finding documentation How the documentation is organized Generating a patch for your changes So what do I do next? Using Django How to install Django Install Python Install Apache and mod_wsgi Get your database running Remove any old versions of Django Install the0 码力 | 2454 页 | 2.85 MB | 1 年前3
Django 1.8.x Documentationoptimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.12 Python compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 3.19 Porting to Python 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 3 . . . . . . . . . . . . . . . . . . . . . . . . . . 1628 11 Indices, glossary and tables 1635 Python Module Index 1637 iii iv CHAPTER 1 Django documentation Everything you need to know about Django0 码力 | 1685 页 | 6.01 MB | 1 年前3
django cms 3.10.x Documentationversion requirements and release notes 9 4.1 Django/Python compatibility table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Python Module Index 285 Index 287 i ii django cms SOFTWARE VERSION REQUIREMENTS AND RELEASE NOTES This document refers to version 3.9.0. 4.1 Django/Python compatibility table LTS in the table indicates a combination of Django and django CMS both covered tested and works. × indicates that it has not been tested, or is known to be incompatible. django CMS Python Django 3.9 3.8 3.7 3.6 3.5 3.4 3.2 3.1 3.0 2.2 2.1 2.0 1.11 4.0.x ✓ ✓ ✓ ✓ × × ✓ ✓ ✓ ✓ × × × 30 码力 | 296 页 | 1.79 MB | 1 年前3
Django CMS 3.9.x Documentationversion requirements and release notes 9 4.1 Django/Python compatibility table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Python Module Index 287 Index 289 i ii django cms Documentation SOFTWARE VERSION REQUIREMENTS AND RELEASE NOTES This document refers to version 3.10.0. 4.1 Django/Python compatibility table LTS in the table indicates a combination of Django and django CMS both covered tested and works. × indicates that it has not been tested, or is known to be incompatible. django CMS Python Django 3.9 3.8 3.7 3.6 3.5 3.4 3.2 3.1 3.0 2.2 2.1 2.0 1.11 4.0.x ✓ ✓ ✓ ✓ × × ✓ ✓ ✓ ✓ × × × 3.9.x0 码力 | 298 页 | 1.79 MB | 6 月前3
Django CMS 4.1.x Documentationlong-term support 3.8 x June 2020 2.2 April 2022 3.7.x October 2020 2.2 March 2022 1.11 March 2020 Django/Python compatibility table LTS in the table indicates a combination of Django and django CMS both covered tested and works. × indicates that it has not been tested, or is known to be incompatible. django CMS Python Django 3.12 3.11 3.10 3.9 3.8 3.7 3.6 5.0 4.2 4.1 4.0 3.2 3.1 3.0 2.2 4.1.x ✓ ✓ ✓ ✓ × × × ✓ LTS ✓ × ✓ ✓ × × × 3.10.x × × ✓ ✓ ✓ ✓ × × × × × ✓ ✓ ✓ ✓ 3.9.x × × × ✓ ✓ ✓ ✓ × × × × ✓ ✓ ✓ ✓ django CMS Python Django 3.12 3.11 3.10 3.9 3.8 3.7 3.6 5.0 4.2 4.1 4.0 3.2 3.1 3.0 2.2 3.8.x × × × ✓ ✓ ✓ ✓ × × × ×0 码力 | 518 页 | 1.66 MB | 6 月前3
共 93 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10













