|
| 1 | +# Django 文档 |
| 2 | + |
| 3 | +原文: [Django documentation](https://docs.djangoproject.com/en/1.9/) |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +你所需要知道的关于Django的一切。 |
| 8 | + |
| 9 | +## 该文档如何组织¶ |
| 10 | + |
| 11 | +Django has a lot of documentation. A high-level overview of how it’s organized will help you know where to look for certain things: |
| 12 | + |
| 13 | +* [Tutorials](https://docs.djangoproject.com/en/1.9/intro/) 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. |
| 14 | +* [Topic guides](https://docs.djangoproject.com/en/1.9/topics/) discuss key topics and concepts at a fairly a fairly high level and provide useful background information and explanation. |
| 15 | +* [Reference guides](https://docs.djangoproject.com/en/1.9/ref/) contain technical reference for APIs and other aspects of Django’s machinery. They describe how it works and how to use it but assume that you have a basic understanding of key concepts. |
| 16 | +* [How-to guides](https://docs.djangoproject.com/en/1.9/howto/) are recipes. They guide you through the steps involved in addressing key problems and use-cases. They are more advanced than tutorials and assume some knowledge of how Django works. |
| 17 | + |
| 18 | + |
| 19 | +---------- |
| 20 | + |
| 21 | + |
| 22 | +## 第一步¶ |
| 23 | + |
| 24 | +你是Django或者编程的新手?这里就是开始的地方! |
| 25 | + |
| 26 | +* **From scratch**: Overview | Installation |
| 27 | +* **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 |
| 28 | +* **Advanced Tutorials**: How to write reusable apps | Writing your first patch for Django |
| 29 | + |
| 30 | + |
| 31 | +---------- |
| 32 | + |
| 33 | + |
| 34 | +## 模型层¶ |
| 35 | + |
| 36 | +Django provides an abstraction layer (the “models”) for structuring and manipulating the data of your Web application. Learn more about it below: |
| 37 | + |
| 38 | +* **Models**: Introduction to models | Field types | Meta options | Model class |
| 39 | +* **QuerySets**: Executing queries | QuerySet method reference | Lookup expressions |
| 40 | +* **Model instances**: Instance methods | Accessing related objects |
| 41 | +* **Migrations**: Introduction to Migrations | Operations reference | SchemaEditor | Writing migrations |
| 42 | +* **Advanced**: Managers | Raw SQL | Transactions | Aggregation | Custom fields | Multiple databases | Custom lookups | Query Expressions | Conditional Expressions | Database Functions |
| 43 | +* **Other**: Supported databases | Legacy databases | Providing initial data | Optimize database access | PostgreSQL specific features |
| 44 | + |
| 45 | + |
| 46 | +---------- |
| 47 | + |
| 48 | + |
| 49 | +## 视图层¶ |
| 50 | + |
| 51 | +Django has the concept of “views” to encapsulate the logic responsible for processing a user’s request and for returning the response. Find all you need to know about views via the links below: |
| 52 | + |
| 53 | +* **The basics**: URLconfs | View functions | Shortcuts | Decorators |
| 54 | +* **Reference**: Built-in Views | Request/response objects | TemplateResponse objects |
| 55 | +* **File uploads**: Overview | File objects | Storage API | Managing files | Custom storage |
| 56 | +* **Class-based views**: Overview | Built-in display views | Built-in editing views | Using mixins | API reference | Flattened index |
| 57 | +* **Advanced**: Generating CSV | Generating PDF |
| 58 | +Middleware: Overview | Built-in middleware classes |
| 59 | + |
| 60 | + |
| 61 | +---------- |
| 62 | + |
| 63 | + |
| 64 | +## 模板层¶ |
| 65 | + |
| 66 | +模板层提供用于渲染要呈现给用户的信息的设计者友好语法。了解设计师如何使用这一语法师以及如何通过编程进行扩展: |
| 67 | + |
| 68 | +* **The basics**: Overview |
| 69 | +* **For designers**: Language overview | Built-in tags and filters | Humanization |
| 70 | +* **For programmers**: Template API | Custom tags and filters |
| 71 | + |
| 72 | + |
| 73 | +---------- |
| 74 | + |
| 75 | + |
| 76 | +## 表单¶ |
| 77 | + |
| 78 | +Django提供了一个丰富的框架,以帮助创建表格和操作表格数据。 |
| 79 | + |
| 80 | +* **The basics**: Overview | Form API | Built-in fields | Built-in widgets |
| 81 | +* **Advanced**: Forms for models | Integrating media | Formsets | Customizing validation |
| 82 | + |
| 83 | + |
| 84 | +---------- |
| 85 | + |
| 86 | + |
| 87 | +## 开发过程¶ |
| 88 | + |
| 89 | +了解各种组件和工具,以助您进行Django应用程序的开发和测试: |
| 90 | + |
| 91 | +* **设置**: [概述](https://docs.djangoproject.com/en/1.9/topics/settings/) | Full list of settings |
| 92 | +* **应用**: [概述](https://docs.djangoproject.com/en/1.9/ref/applications/) |
| 93 | +* **异常**: [概述](https://docs.djangoproject.com/en/1.9/ref/exceptions/) |
| 94 | +* **django-admin 和 manage.py**: [概述](https://docs.djangoproject.com/en/1.9/ref/django-admin/) | Adding custom commands |
| 95 | +* **测试**: [简介](https://docs.djangoproject.com/en/1.9/topics/testing/) | Writing and running tests | Included testing tools | Advanced topics |
| 96 | +* **部署**: [概述](https://docs.djangoproject.com/en/1.9/howto/deployment/) | WSGI servers | Deploying static files | Tracking code errors by email |
| 97 | + |
| 98 | + |
| 99 | +---------- |
| 100 | + |
| 101 | + |
| 102 | +## admin站点¶ |
| 103 | + |
| 104 | +所有你所需要知道的自动管理接口,Django最流行的功能之一: |
| 105 | + |
| 106 | +* [Admin站点](https://docs.djangoproject.com/en/1.9/ref/contrib/admin/) |
| 107 | +* [Admin动作](https://docs.djangoproject.com/en/1.9/ref/contrib/admin/actions/) |
| 108 | +* [Admin文档生成器](https://docs.djangoproject.com/en/1.9/ref/contrib/admin/admindocs/) |
| 109 | + |
| 110 | + |
| 111 | +---------- |
| 112 | + |
| 113 | + |
| 114 | +## 安全¶ |
| 115 | + |
| 116 | +安全性是至关重要的Web应用程序的开发主题,Django提供多种保护手段和机制: |
| 117 | + |
| 118 | +* [安全概述](https://docs.djangoproject.com/en/1.9/topics/security/) |
| 119 | +* [Django已披露的安全问题](https://docs.djangoproject.com/en/1.9/releases/security/) |
| 120 | +* [点击劫持保护](https://docs.djangoproject.com/en/1.9/ref/clickjacking/) |
| 121 | +* [跨站请求伪造保护](https://docs.djangoproject.com/en/1.9/ref/csrf/) |
| 122 | +* [加密签名](https://docs.djangoproject.com/en/1.9/topics/signing/) |
| 123 | +* [安全中间件](https://docs.djangoproject.com/en/1.9/ref/middleware/#security-middleware) |
| 124 | + |
| 125 | + |
| 126 | +---------- |
| 127 | + |
| 128 | + |
| 129 | +## 国际化和本地化¶ |
| 130 | + |
| 131 | +Django还提供了一个强大的国际化和本地化的框架,以帮助您的用于多国语言和世界各地区的应用的发展: |
| 132 | + |
| 133 | +* [概述](./国际化和本地化.md) | [国际化](https://docs.djangoproject.com/en/1.9/topics/i18n/translation/) | [本地化](https://docs.djangoproject.com/en/1.9/topics/i18n/translation/#how-to-create-language-files) | [本地的Web用户界面格式及表单输入](https://docs.djangoproject.com/en/1.9/topics/i18n/formatting/) |
| 134 | +* [时区](https://docs.djangoproject.com/en/1.9/topics/i18n/timezones/) |
| 135 | + |
| 136 | + |
| 137 | +---------- |
| 138 | + |
| 139 | + |
| 140 | +## 性能和优化¶ |
| 141 | + |
| 142 | +有各种各样的技术和工具,可以帮助你的代码的运行更有效率 - 速度更快,并且使用更少的系统资源。 |
| 143 | + |
| 144 | +* [性能和优化概述](https://docs.djangoproject.com/en/1.9/topics/performance/) |
| 145 | + |
| 146 | + |
| 147 | +---------- |
| 148 | + |
| 149 | + |
| 150 | +##Python兼容性¶ |
| 151 | + |
| 152 | +Django的目标是兼容不同Python风味及版本: |
| 153 | + |
| 154 | +* [Jython的支持](https://docs.djangoproject.com/en/1.9/howto/jython/) |
| 155 | +* [Python 3 兼容性](https://docs.djangoproject.com/en/1.9/topics/python3/) |
| 156 | + |
| 157 | + |
| 158 | +---------- |
| 159 | + |
| 160 | + |
| 161 | +## 地理框架¶ |
| 162 | + |
| 163 | +[GeoDjango](https://docs.djangoproject.com/en/1.9/ref/contrib/gis/)意图成为一个世界级的地理Web框架。它的目标是尽可能容易地构建GIS Web应用程序,并加强空间功能数据的能力。 |
| 164 | + |
| 165 | + |
| 166 | +---------- |
| 167 | + |
| 168 | + |
| 169 | +## 常见的Web应用程序的工具¶ |
| 170 | + |
| 171 | +Django还提供了多种通常在Web应用程序开发过程中需要的工具: |
| 172 | + |
| 173 | +* **认证**: Overview | Using the authentication system | Password management | Customizing authentication | API Reference |
| 174 | +* [Caching]() |
| 175 | +* [Logging]() |
| 176 | +* [Sending emails]() |
| 177 | +* [Syndication feeds (RSS/Atom)]() |
| 178 | +* [Pagination]() |
| 179 | +* [Messages framework]() |
| 180 | +* [Serialization]() |
| 181 | +* [Sessions]() |
| 182 | +* [Sitemaps]() |
| 183 | +* [Static files management]() |
| 184 | +* [Data validation]() |
| 185 | + |
| 186 | + |
| 187 | +---------- |
| 188 | + |
| 189 | + |
| 190 | +##其他核心功能¶ |
| 191 | + |
| 192 | +了解Django框架的其他一些核心功能: |
| 193 | + |
| 194 | +* [Conditional content processing]() |
| 195 | +* [Content types and generic relations]() |
| 196 | +* [Flatpages]() |
| 197 | +* [Redirects]() |
| 198 | +* [Signals]() |
| 199 | +* [System check framework]() |
| 200 | +* [The sites framework]() |
| 201 | +* [Unicode in Django]() |
| 202 | + |
| 203 | + |
| 204 | +---------- |
| 205 | + |
| 206 | + |
| 207 | +## Django的开源项目¶ |
| 208 | + |
| 209 | +了解了Django项目本身以及您如何参与到开发过程: |
| 210 | + |
| 211 | +* **社区**: How to get involved | The release process | Team organization | Meet the team | Current roles | The Django source code repository | Security policies | Mailing lists |
| 212 | +* **设计理念**: Overview |
| 213 | +* **文档**: About this documentation |
| 214 | +* **第三方发行版本**: Overview |
| 215 | +* **Django over time**: API stability | Release notes and upgrading instructions | Deprecation Timeline |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
0 commit comments