Django 文档¶
你所需要知道的关于 Django 的一切。
快速入门¶
你是刚学 Django 或是初学编程? 这就是你开始学习的地方!
From scratch: Overview | Installation
Tutorial: Part 1: Requests and responses | Part 2: Models and the admin site | Part 3: Views and templates | Part 4: Forms and generic views | Part 5: Testing | Part 6: Static files | Part 7: Customizing the admin site | Part 8: Adding third-party packages
Advanced Tutorials: How to write reusable apps | Writing your first contribution to Django
获取帮助¶
遇到问题?我们可以帮你!
Try the FAQ -- it's got answers to many common questions.
Looking for specific information? Try the Index, Module Index or the detailed table of contents.
Not found anything? See FAQ:获取帮助 for information on getting support and asking questions to the community.
在我们的 ticket tracker 报告关于 Django 的 Bug。
这份文档是如何组织的¶
Django 有丰富的文档。一份高度概述的文档会告诉你在哪里找到特定的东西:
模型层¶
Django 提供了一个抽象的模型(“models”)层,用于结构化和操作你的网页应用程序的数据。阅读下面内容了解更多:
Models: Introduction to models | Field types | Indexes | Meta options | Model class
QuerySets: Making queries | QuerySet method reference | Lookup expressions
Model instances: Instance methods | Accessing related objects
Migrations: Introduction to Migrations | Operations reference | SchemaEditor | Writing migrations
Advanced: Managers | Raw SQL | Transactions | Aggregation | Search | Custom fields | Multiple databases | Custom lookups | Query Expressions | Conditional Expressions | Database Functions
Other: Supported databases | Legacy databases | Providing initial data | Optimize database access | PostgreSQL specific features
视图层¶
Django 具有 “视图” 的概念,负责处理用户的请求并返回响应。通过以下链接查找所有你需要知道的有关视图的信息:
The basics: URLconfs | View functions | Shortcuts | Decorators | Asynchronous Support
Reference: Built-in Views | Request/response objects | TemplateResponse objects
File uploads: Overview | File objects | Storage API | Managing files | Custom storage
Class-based views: Overview | Built-in display views | Built-in editing views | Using mixins | API reference | Flattened index
Advanced: Generating CSV | Generating PDF
Middleware: Overview | Built-in middleware classes
模板层¶
模板层提供了一个对设计者友好的语法用于渲染向用户呈现的信息。学习如何使用语法(面向设计者)以及如何扩展(面向程序员):
The basics: Overview
For designers: Language overview | Built-in tags and filters | Humanization
For programmers: Template API | Custom tags and filters | Custom template backend
表单¶
Django 提供了一个丰富的框架来帮助创建表单和处理表单数据。
The basics: Overview | Form API | Built-in fields | Built-in widgets
Advanced: Forms for models | Integrating media | Formsets | Customizing validation
开发进程¶
学习众多的组件及工具,来帮助你开发和测试 Django 应用:
Settings: Overview | Full list of settings
Applications: Overview
Exceptions: Overview
django-admin and manage.py: Overview | Adding custom commands
Testing: Introduction | Writing and running tests | Included testing tools | Advanced topics
Deployment: Overview | WSGI servers | ASGI servers | Deploying static files | Tracking code errors by email | Deployment checklist
管理¶
找到所有你想知道的,关于自动化管理界面的知识,Django 最受欢迎的特性之一:
安全¶
安全是网络应用程序开发中最重要的一个话题,Django 提供了多种保护工具和机制。
国际化和本地化¶
Django 提供了一个强大的国际化和本地化的框架, 以帮助您在多语言和世界各地区进行应用程序的开发:
性能和优化¶
有各种各样的技术和工具,可以帮助你的代码的运行更高效,更快和使用更少的系统资源.
地理框架¶
GeoDjango intends to be a world-class geographic web framework. Its goal is to make it as easy as possible to build GIS web applications and harness the power of spatially enabled data.
常见的网络应用工具¶
Django 提供了网络应用程序开发中普遍需要的多种工具:
Authentication: Overview | Using the authentication system | Password management | Customizing authentication | API Reference
其它核心功能¶
了解更多 Django 框架的其他核心功能 :
Django 开源项目¶
了解 Django 项目本身的开发进程以及你如何为 Django 做贡献:
Community: Contributing to Django | The release process | Team organization | The Django source code repository | Security policies | Mailing lists and Forum
Design philosophies: Overview
Documentation: About this documentation
Third-party distributions: Overview
Django over time: API stability | Release notes and upgrading instructions | Deprecation Timeline