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