index.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. ====================
  2. Django documentation
  3. ====================
  4. .. rubric:: Everything you need to know about Django.
  5. Getting help
  6. ============
  7. Having trouble? We'd like to help!
  8. * Try the :doc:`FAQ <faq/index>` -- it's got answers to many common questions.
  9. * Looking for specific information? Try the :ref:`genindex`, :ref:`modindex` or
  10. the :doc:`detailed table of contents <contents>`.
  11. * Search for information in the archives of the |django-users| mailing list, or
  12. `post a question`_.
  13. * Ask a question in the `#django IRC channel`_, or search the `IRC logs`_ to see
  14. if it's been asked before.
  15. * Report bugs with Django in our `ticket tracker`_.
  16. .. _archives: https://groups.google.com/group/django-users/
  17. .. _post a question: https://groups.google.com/d/forum/django-users
  18. .. _#django IRC channel: irc://irc.freenode.net/django
  19. .. _IRC logs: http://django-irc-logs.com/
  20. .. _ticket tracker: https://code.djangoproject.com/
  21. How the documentation is organized
  22. ==================================
  23. Django has a lot of documentation. A high-level overview of how it's organized
  24. will help you know where to look for certain things:
  25. * :doc:`Tutorials </intro/index>` take you by the hand through a series of
  26. steps to create a Web application. Start here if you're new to Django or Web
  27. application development. Also look at the ":ref:`index-first-steps`" below.
  28. * :doc:`Topic guides </topics/index>` discuss key topics and concepts at a
  29. fairly high level and provide useful background information and explanation.
  30. * :doc:`Reference guides </ref/index>` contain technical reference for APIs and
  31. other aspects of Django's machinery. They describe how it works and how to
  32. use it but assume that you have a basic understanding of key concepts.
  33. * :doc:`How-to guides </howto/index>` are recipes. They guide you through the
  34. steps involved in addressing key problems and use-cases. They are more
  35. advanced than tutorials and assume some knowledge of how Django works.
  36. .. _index-first-steps:
  37. First steps
  38. ===========
  39. Are you new to Django or to programming? This is the place to start!
  40. * **From scratch:**
  41. :doc:`Overview <intro/overview>` |
  42. :doc:`Installation <intro/install>`
  43. * **Tutorial:**
  44. :doc:`Part 1: Requests and responses <intro/tutorial01>` |
  45. :doc:`Part 2: Models and the admin site <intro/tutorial02>` |
  46. :doc:`Part 3: Views and templates <intro/tutorial03>` |
  47. :doc:`Part 4: Forms and generic views <intro/tutorial04>` |
  48. :doc:`Part 5: Testing <intro/tutorial05>` |
  49. :doc:`Part 6: Static files <intro/tutorial06>` |
  50. :doc:`Part 7: Customizing the admin site <intro/tutorial07>`
  51. * **Advanced Tutorials:**
  52. :doc:`How to write reusable apps <intro/reusable-apps>` |
  53. :doc:`Writing your first patch for Django <intro/contributing>`
  54. The model layer
  55. ===============
  56. Django provides an abstraction layer (the "models") for structuring and
  57. manipulating the data of your Web application. Learn more about it below:
  58. * **Models:**
  59. :doc:`Introduction to models <topics/db/models>` |
  60. :doc:`Field types <ref/models/fields>` |
  61. :doc:`Meta options <ref/models/options>` |
  62. :doc:`Model class <ref/models/class>`
  63. * **QuerySets:**
  64. :doc:`Executing queries <topics/db/queries>` |
  65. :doc:`QuerySet method reference <ref/models/querysets>` |
  66. :doc:`Lookup expressions <ref/models/lookups>`
  67. * **Model instances:**
  68. :doc:`Instance methods <ref/models/instances>` |
  69. :doc:`Accessing related objects <ref/models/relations>`
  70. * **Migrations:**
  71. :doc:`Introduction to Migrations<topics/migrations>` |
  72. :doc:`Operations reference <ref/migration-operations>` |
  73. :doc:`SchemaEditor <ref/schema-editor>` |
  74. :doc:`Writing migrations <howto/writing-migrations>`
  75. * **Advanced:**
  76. :doc:`Managers <topics/db/managers>` |
  77. :doc:`Raw SQL <topics/db/sql>` |
  78. :doc:`Transactions <topics/db/transactions>` |
  79. :doc:`Aggregation <topics/db/aggregation>` |
  80. :doc:`Custom fields <howto/custom-model-fields>` |
  81. :doc:`Multiple databases <topics/db/multi-db>` |
  82. :doc:`Custom lookups <howto/custom-lookups>` |
  83. :doc:`Query Expressions <ref/models/expressions>` |
  84. :doc:`Conditional Expressions <ref/models/conditional-expressions>` |
  85. :doc:`Database Functions <ref/models/database-functions>`
  86. * **Other:**
  87. :doc:`Supported databases <ref/databases>` |
  88. :doc:`Legacy databases <howto/legacy-databases>` |
  89. :doc:`Providing initial data <howto/initial-data>` |
  90. :doc:`Optimize database access <topics/db/optimization>` |
  91. :doc:`PostgreSQL specific features <ref/contrib/postgres/index>`
  92. The view layer
  93. ==============
  94. Django has the concept of "views" to encapsulate the logic responsible for
  95. processing a user's request and for returning the response. Find all you need
  96. to know about views via the links below:
  97. * **The basics:**
  98. :doc:`URLconfs <topics/http/urls>` |
  99. :doc:`View functions <topics/http/views>` |
  100. :doc:`Shortcuts <topics/http/shortcuts>` |
  101. :doc:`Decorators <topics/http/decorators>`
  102. * **Reference:**
  103. :doc:`Built-in Views <ref/views>` |
  104. :doc:`Request/response objects <ref/request-response>` |
  105. :doc:`TemplateResponse objects <ref/template-response>`
  106. * **File uploads:**
  107. :doc:`Overview <topics/http/file-uploads>` |
  108. :doc:`File objects <ref/files/file>` |
  109. :doc:`Storage API <ref/files/storage>` |
  110. :doc:`Managing files <topics/files>` |
  111. :doc:`Custom storage <howto/custom-file-storage>`
  112. * **Class-based views:**
  113. :doc:`Overview <topics/class-based-views/index>` |
  114. :doc:`Built-in display views <topics/class-based-views/generic-display>` |
  115. :doc:`Built-in editing views <topics/class-based-views/generic-editing>` |
  116. :doc:`Using mixins <topics/class-based-views/mixins>` |
  117. :doc:`API reference <ref/class-based-views/index>` |
  118. :doc:`Flattened index<ref/class-based-views/flattened-index>`
  119. * **Advanced:**
  120. :doc:`Generating CSV <howto/outputting-csv>` |
  121. :doc:`Generating PDF <howto/outputting-pdf>`
  122. * **Middleware:**
  123. :doc:`Overview <topics/http/middleware>` |
  124. :doc:`Built-in middleware classes <ref/middleware>`
  125. The template layer
  126. ==================
  127. The template layer provides a designer-friendly syntax for rendering the
  128. information to be presented to the user. Learn how this syntax can be used by
  129. designers and how it can be extended by programmers:
  130. * **The basics:**
  131. :doc:`Overview <topics/templates>`
  132. * **For designers:**
  133. :doc:`Language overview <ref/templates/language>` |
  134. :doc:`Built-in tags and filters <ref/templates/builtins>` |
  135. :doc:`Humanization <ref/contrib/humanize>`
  136. * **For programmers:**
  137. :doc:`Template API <ref/templates/api>` |
  138. :doc:`Custom tags and filters <howto/custom-template-tags>`
  139. Forms
  140. =====
  141. Django provides a rich framework to facilitate the creation of forms and the
  142. manipulation of form data.
  143. * **The basics:**
  144. :doc:`Overview <topics/forms/index>` |
  145. :doc:`Form API <ref/forms/api>` |
  146. :doc:`Built-in fields <ref/forms/fields>` |
  147. :doc:`Built-in widgets <ref/forms/widgets>`
  148. * **Advanced:**
  149. :doc:`Forms for models <topics/forms/modelforms>` |
  150. :doc:`Integrating media <topics/forms/media>` |
  151. :doc:`Formsets <topics/forms/formsets>` |
  152. :doc:`Customizing validation <ref/forms/validation>`
  153. The development process
  154. =======================
  155. Learn about the various components and tools to help you in the development and
  156. testing of Django applications:
  157. * **Settings:**
  158. :doc:`Overview <topics/settings>` |
  159. :doc:`Full list of settings <ref/settings>`
  160. * **Applications:**
  161. :doc:`Overview <ref/applications>`
  162. * **Exceptions:**
  163. :doc:`Overview <ref/exceptions>`
  164. * **django-admin and manage.py:**
  165. :doc:`Overview <ref/django-admin>` |
  166. :doc:`Adding custom commands <howto/custom-management-commands>`
  167. * **Testing:**
  168. :doc:`Introduction <topics/testing/index>` |
  169. :doc:`Writing and running tests <topics/testing/overview>` |
  170. :doc:`Included testing tools <topics/testing/tools>` |
  171. :doc:`Advanced topics <topics/testing/advanced>`
  172. * **Deployment:**
  173. :doc:`Overview <howto/deployment/index>` |
  174. :doc:`WSGI servers <howto/deployment/wsgi/index>` |
  175. :doc:`Deploying static files <howto/static-files/deployment>` |
  176. :doc:`Tracking code errors by email <howto/error-reporting>`
  177. The admin
  178. =========
  179. Find all you need to know about the automated admin interface, one of Django's
  180. most popular features:
  181. * :doc:`Admin site <ref/contrib/admin/index>`
  182. * :doc:`Admin actions <ref/contrib/admin/actions>`
  183. * :doc:`Admin documentation generator<ref/contrib/admin/admindocs>`
  184. Security
  185. ========
  186. Security is a topic of paramount importance in the development of Web
  187. applications and Django provides multiple protection tools and mechanisms:
  188. * :doc:`Security overview <topics/security>`
  189. * :doc:`Disclosed security issues in Django <releases/security>`
  190. * :doc:`Clickjacking protection <ref/clickjacking>`
  191. * :doc:`Cross Site Request Forgery protection <ref/csrf>`
  192. * :doc:`Cryptographic signing <topics/signing>`
  193. * :ref:`Security Middleware <security-middleware>`
  194. Internationalization and localization
  195. =====================================
  196. Django offers a robust internationalization and localization framework to
  197. assist you in the development of applications for multiple languages and world
  198. regions:
  199. * :doc:`Overview <topics/i18n/index>` |
  200. :doc:`Internationalization <topics/i18n/translation>` |
  201. :ref:`Localization <how-to-create-language-files>` |
  202. :doc:`Localized Web UI formatting and form input <topics/i18n/formatting>`
  203. * :doc:`Time zones </topics/i18n/timezones>`
  204. Performance and optimization
  205. ============================
  206. There are a variety of techniques and tools that can help get your code running
  207. more efficiently - faster, and using fewer system resources.
  208. * :doc:`Performance and optimization overview <topics/performance>`
  209. Python compatibility
  210. ====================
  211. Django aims to be compatible with multiple different flavors and versions of
  212. Python:
  213. * :doc:`Jython support <howto/jython>`
  214. * :doc:`Python 3 compatibility <topics/python3>`
  215. Geographic framework
  216. ====================
  217. :doc:`GeoDjango <ref/contrib/gis/index>` intends to be a world-class geographic
  218. Web framework. Its goal is to make it as easy as possible to build GIS Web
  219. applications and harness the power of spatially enabled data.
  220. Common Web application tools
  221. ============================
  222. Django offers multiple tools commonly needed in the development of Web
  223. applications:
  224. * **Authentication:**
  225. :doc:`Overview <topics/auth/index>` |
  226. :doc:`Using the authentication system <topics/auth/default>` |
  227. :doc:`Password management <topics/auth/passwords>` |
  228. :doc:`Customizing authentication <topics/auth/customizing>` |
  229. :doc:`API Reference <ref/contrib/auth>`
  230. * :doc:`Caching <topics/cache>`
  231. * :doc:`Logging <topics/logging>`
  232. * :doc:`Sending emails <topics/email>`
  233. * :doc:`Syndication feeds (RSS/Atom) <ref/contrib/syndication>`
  234. * :doc:`Pagination <topics/pagination>`
  235. * :doc:`Messages framework <ref/contrib/messages>`
  236. * :doc:`Serialization <topics/serialization>`
  237. * :doc:`Sessions <topics/http/sessions>`
  238. * :doc:`Sitemaps <ref/contrib/sitemaps>`
  239. * :doc:`Static files management <ref/contrib/staticfiles>`
  240. * :doc:`Data validation <ref/validators>`
  241. Other core functionalities
  242. ==========================
  243. Learn about some other core functionalities of the Django framework:
  244. * :doc:`Conditional content processing <topics/conditional-view-processing>`
  245. * :doc:`Content types and generic relations <ref/contrib/contenttypes>`
  246. * :doc:`Flatpages <ref/contrib/flatpages>`
  247. * :doc:`Redirects <ref/contrib/redirects>`
  248. * :doc:`Signals <topics/signals>`
  249. * :doc:`System check framework <topics/checks>`
  250. * :doc:`The sites framework <ref/contrib/sites>`
  251. * :doc:`Unicode in Django <ref/unicode>`
  252. The Django open-source project
  253. ==============================
  254. Learn about the development process for the Django project itself and about how
  255. you can contribute:
  256. * **Community:**
  257. :doc:`How to get involved <internals/contributing/index>` |
  258. :doc:`The release process <internals/release-process>` |
  259. :doc:`Team organization <internals/organization>` |
  260. :doc:`Meet the team <internals/team>` |
  261. :doc:`Current roles <internals/roles>` |
  262. :doc:`The Django source code repository <internals/git>` |
  263. :doc:`Security policies <internals/security>` |
  264. :doc:`Mailing lists <internals/mailing-lists>`
  265. * **Design philosophies:**
  266. :doc:`Overview <misc/design-philosophies>`
  267. * **Documentation:**
  268. :doc:`About this documentation <internals/contributing/writing-documentation>`
  269. * **Third-party distributions:**
  270. :doc:`Overview <misc/distributions>`
  271. * **Django over time:**
  272. :doc:`API stability <misc/api-stability>` |
  273. :doc:`Release notes and upgrading instructions <releases/index>` |
  274. :doc:`Deprecation Timeline <internals/deprecation>`