 Django 官方教程翻译项目编写视图 设计模板 这只是冰山一角 Django 最初被设计用于具有快速开发需求的新闻类站点,目的是要实现简单快捷的网站开发。以下 内容简要介绍了如何使用 Django 实现一个数据库驱动的 Web 应用。 为了让您充分理解 Django 的工作原理,这份文档为您详细描述了相关的技术细节,不过这并不是 一份入门教程或者是参考文档(我们当然也为您准备了这些)。如果您想要马上开始一个项目,可以 - 8 - 本文档使用 书栈(BookStack.CN) 构建 当你的模型完成定义,Django 就会自动生成一个专业的生产级管理页面 - 一个可以让已认证用户 进行添加、更改和删除对象的 Web 站点。你只需简单的在 admin 站点上注册你的模型即可。 1. # mysite/news/models.py 2. 3. from django.db import models 4 应用的典型流程是:先建立数据模型,然后搭建管理站点,尽可能快的跑起来。那样 你的团队(或者客户)就可以向网站里填充数据了。后面我们会谈到如何展示这些数据。 简洁优雅的 URL 规划对于一个高质量 Web 应用来说至关重要。Django 推崇优美的 URL 设计, 所以不要把诸如 .php 和 .asp 之类的冗余的后缀放到 URL 里。 为了设计你自己的 URL,你需要创建一个叫做 URLconf0 码力 | 103 页 | 1.86 MB | 1 年前3 Django 官方教程翻译项目编写视图 设计模板 这只是冰山一角 Django 最初被设计用于具有快速开发需求的新闻类站点,目的是要实现简单快捷的网站开发。以下 内容简要介绍了如何使用 Django 实现一个数据库驱动的 Web 应用。 为了让您充分理解 Django 的工作原理,这份文档为您详细描述了相关的技术细节,不过这并不是 一份入门教程或者是参考文档(我们当然也为您准备了这些)。如果您想要马上开始一个项目,可以 - 8 - 本文档使用 书栈(BookStack.CN) 构建 当你的模型完成定义,Django 就会自动生成一个专业的生产级管理页面 - 一个可以让已认证用户 进行添加、更改和删除对象的 Web 站点。你只需简单的在 admin 站点上注册你的模型即可。 1. # mysite/news/models.py 2. 3. from django.db import models 4 应用的典型流程是:先建立数据模型,然后搭建管理站点,尽可能快的跑起来。那样 你的团队(或者客户)就可以向网站里填充数据了。后面我们会谈到如何展示这些数据。 简洁优雅的 URL 规划对于一个高质量 Web 应用来说至关重要。Django 推崇优美的 URL 设计, 所以不要把诸如 .php 和 .asp 之类的冗余的后缀放到 URL 里。 为了设计你自己的 URL,你需要创建一个叫做 URLconf0 码力 | 103 页 | 1.86 MB | 1 年前3
 Django、Vue 和Element UI 前后端原理论述总体而言,这种前后端分离的开发模式有助于实现前后端开发的解耦,使得各自的 开发工作更加专注和高效。前端负责用户界面的呈现和交互,后端负责数据处理和业务 逻辑,通过 API 接口进行数据传输和交互,从而实现一个完整的 Web 应用。 3 《51 测试天地》七十四 www.51testing.com 二、搭建流程 2.1 后端搭建流程 安装相关包->创建工程->后端依赖(pipenv)创建虚拟环境->后端服务配置启动->后 测试天地》七十四 www.51testing.com 依赖包,这些依赖包通常存储在 package.json 文件中。 前端服务配置启动:在项目目录下执行 npm run serve 命令,启动前端开发服务器, 可以在浏览器中预览项目。 三、关键技术介绍 1、后端为什么要创建虚拟环境,创建虚拟环境可以达到什么效果? 隔离项目依赖:通过创建后端虚拟环境,每个项目都拥有独立的 Python 解释器和包 等工具来管理项目的依赖,这样 可以确保项目在不同环境中安装相同的依赖版本,从而避免由于依赖版本不一致而引发 的错误。 提高项目可移植性:将项目的依赖放在虚拟环境中,可以使得项目在不同的计算机 或服务器上都能轻松地部署和运行,而不需要担心依赖问题。 简化依赖管理:虚拟环境可以将项目所需的依赖以及其版本信息保存在一个文件中 (例如 Pipfile.lock),这样可以方便地重现项目的开发环境,使得依赖的安装和管理更加0 码力 | 61 页 | 6.84 MB | 1 年前3 Django、Vue 和Element UI 前后端原理论述总体而言,这种前后端分离的开发模式有助于实现前后端开发的解耦,使得各自的 开发工作更加专注和高效。前端负责用户界面的呈现和交互,后端负责数据处理和业务 逻辑,通过 API 接口进行数据传输和交互,从而实现一个完整的 Web 应用。 3 《51 测试天地》七十四 www.51testing.com 二、搭建流程 2.1 后端搭建流程 安装相关包->创建工程->后端依赖(pipenv)创建虚拟环境->后端服务配置启动->后 测试天地》七十四 www.51testing.com 依赖包,这些依赖包通常存储在 package.json 文件中。 前端服务配置启动:在项目目录下执行 npm run serve 命令,启动前端开发服务器, 可以在浏览器中预览项目。 三、关键技术介绍 1、后端为什么要创建虚拟环境,创建虚拟环境可以达到什么效果? 隔离项目依赖:通过创建后端虚拟环境,每个项目都拥有独立的 Python 解释器和包 等工具来管理项目的依赖,这样 可以确保项目在不同环境中安装相同的依赖版本,从而避免由于依赖版本不一致而引发 的错误。 提高项目可移植性:将项目的依赖放在虚拟环境中,可以使得项目在不同的计算机 或服务器上都能轻松地部署和运行,而不需要担心依赖问题。 简化依赖管理:虚拟环境可以将项目所需的依赖以及其版本信息保存在一个文件中 (例如 Pipfile.lock),这样可以方便地重现项目的开发环境,使得依赖的安装和管理更加0 码力 | 61 页 | 6.84 MB | 1 年前3
 Django 1.8.x DocumentationDjango provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Meta options documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed multiple languages and world regions: Overview | Internationalization | Localization | Localized Web UI formatting and form input “Local flavor” Time zones Performance and optimization There are a0 码力 | 2454 页 | 2.85 MB | 1 年前3 Django 1.8.x DocumentationDjango provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Meta options documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed multiple languages and world regions: Overview | Internationalization | Localization | Localized Web UI formatting and form input “Local flavor” Time zones Performance and optimization There are a0 码力 | 2454 页 | 2.85 MB | 1 年前3
 Django 1.8.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.14 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: 1 Django Documentation, Release 1.8.20.dev20180306181007 documentation generator 1.9 Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: • Security overview •0 码力 | 1685 页 | 6.01 MB | 1 年前3 Django 1.8.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.14 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: 1 Django Documentation, Release 1.8.20.dev20180306181007 documentation generator 1.9 Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: • Security overview •0 码力 | 1685 页 | 6.01 MB | 1 年前3
 Django 1.10.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.16 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Meta options0 码力 | 1817 页 | 6.19 MB | 1 年前3 Django 1.10.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.16 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Meta options0 码力 | 1817 页 | 6.19 MB | 1 年前3
 Django 1.10.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Meta options documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2538 页 | 2.59 MB | 1 年前3 Django 1.10.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Meta options documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2538 页 | 2.59 MB | 1 年前3
 Django 2.2.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Indexes | Meta documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2915 页 | 2.83 MB | 1 年前3 Django 2.2.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Indexes | Meta documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2915 页 | 2.83 MB | 1 年前3
 Django 1.11.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.16 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Indexes |0 码力 | 1878 页 | 6.40 MB | 1 年前3 Django 1.11.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.16 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Indexes |0 码力 | 1878 页 | 6.40 MB | 1 年前3
 Django 2.1.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.14 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Indexes |0 码力 | 1910 页 | 6.49 MB | 1 年前3 Django 2.1.x Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.14 Common Web application tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.15 • Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. • Topic Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: • Models: Introduction to models | Field types | Indexes |0 码力 | 1910 页 | 6.49 MB | 1 年前3
 Django 1.11.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Indexes | Meta documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2747 页 | 2.67 MB | 1 年前3 Django 1.11.x Documentationthings: Tutorials take you by the hand through a series of steps to create a Web application. Start here if you’re new to Django or Web application development. Also look at the “First steps” below. Topic guides Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: Models: Introduction to models | Field types | Indexes | Meta documentation generator Security Security is a topic of paramount importance in the development of Web applications and Django provides multiple protection tools and mechanisms: Security overview Disclosed0 码力 | 2747 页 | 2.67 MB | 1 年前3
共 91 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10














