index.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. .. _ref-contrib-index:
  2. ====================
  3. ``contrib`` packages
  4. ====================
  5. Django aims to follow Python's `"batteries included" philosophy`_. It ships
  6. with a variety of extra, optional tools that solve common Web-development
  7. problems.
  8. This code lives in ``django/contrib`` in the Django distribution. This document
  9. gives a rundown of the packages in ``contrib``, along with any dependencies
  10. those packages have.
  11. .. admonition:: Note
  12. For most of these add-ons -- specifically, the add-ons that include either
  13. models or template tags -- you'll need to add the package name (e.g.,
  14. ``'django.contrib.admin'``) to your ``INSTALLED_APPS`` setting and re-run
  15. ``manage.py syncdb``.
  16. .. _"batteries included" philosophy: http://docs.python.org/tut/node12.html#batteries-included
  17. .. toctree::
  18. :maxdepth: 1
  19. admin/index
  20. auth
  21. comments/index
  22. contenttypes
  23. csrf
  24. databrowse
  25. flatpages
  26. formtools/index
  27. humanize
  28. localflavor
  29. messages
  30. redirects
  31. sitemaps
  32. sites
  33. syndication
  34. webdesign
  35. admin
  36. =====
  37. The automatic Django administrative interface. For more information, see
  38. :ref:`Tutorial 2 <intro-tutorial02>` and the
  39. :ref:`admin documentation <ref-contrib-admin>`.
  40. Requires the auth_ and contenttypes_ contrib packages to be installed.
  41. auth
  42. ====
  43. Django's authentication framework.
  44. See :ref:`topics-auth`.
  45. comments
  46. ========
  47. .. versionchanged:: 1.0
  48. The comments application has been rewriten. See :ref:`ref-contrib-comments-upgrade`
  49. for information on howto upgrade.
  50. A simple yet flexible comments system. See :ref:`ref-contrib-comments-index`.
  51. contenttypes
  52. ============
  53. A light framework for hooking into "types" of content, where each installed
  54. Django model is a separate content type.
  55. See the :ref:`contenttypes documentation <ref-contrib-contenttypes>`.
  56. csrf
  57. ====
  58. A middleware for preventing Cross Site Request Forgeries
  59. See the :ref:`csrf documentation <ref-contrib-csrf>`.
  60. flatpages
  61. =========
  62. A framework for managing simple "flat" HTML content in a database.
  63. See the :ref:`flatpages documentation <ref-contrib-flatpages>`.
  64. Requires the sites_ contrib package to be installed as well.
  65. formtools
  66. =========
  67. A set of high-level abstractions for Django forms (django.forms).
  68. django.contrib.formtools.preview
  69. --------------------------------
  70. An abstraction of the following workflow:
  71. "Display an HTML form, force a preview, then do something with the submission."
  72. See the :ref:`form preview documentation <ref-contrib-formtools-form-preview>`.
  73. django.contrib.formtools.wizard
  74. --------------------------------
  75. Splits forms across multiple Web pages.
  76. See the :ref:`form wizard documentation <ref-contrib-formtools-form-wizard>`.
  77. humanize
  78. ========
  79. A set of Django template filters useful for adding a "human touch" to data.
  80. See the :ref:`humanize documentation <ref-contrib-humanize>`.
  81. localflavor
  82. ===========
  83. A collection of various Django snippets that are useful only for a particular
  84. country or culture. For example, ``django.contrib.localflavor.us.forms``
  85. contains a ``USZipCodeField`` that you can use to validate U.S. zip codes.
  86. See the :ref:`localflavor documentation <ref-contrib-localflavor>`.
  87. .. _ref-contrib-markup:
  88. markup
  89. ======
  90. A collection of template filters that implement common markup languages:
  91. * ``textile`` -- implements `Textile`_
  92. * ``markdown`` -- implements `Markdown`_
  93. * ``restructuredtext`` -- implements `ReST (ReStructured Text)`_
  94. In each case, the filter expects formatted markup as a string and returns a
  95. string representing the marked-up text. For example, the ``textile`` filter
  96. converts text that is marked-up in Textile format to HTML.
  97. To activate these filters, add ``'django.contrib.markup'`` to your
  98. :setting:`INSTALLED_APPS` setting. Once you've done that, use ``{% load markup %}`` in
  99. a template, and you'll have access to these filters. For more documentation,
  100. read the source code in django/contrib/markup/templatetags/markup.py.
  101. .. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
  102. .. _Markdown: http://en.wikipedia.org/wiki/Markdown
  103. .. _ReST (ReStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
  104. messages
  105. ========
  106. .. versionchanged:: 1.2
  107. The messages framework was added.
  108. A framework for storing and retrieving temporary cookie- or session-based
  109. messages
  110. See the :ref:`messages documentation <ref-contrib-messages>`.
  111. redirects
  112. =========
  113. A framework for managing redirects.
  114. See the :ref:`redirects documentation <ref-contrib-redirects>`.
  115. sessions
  116. ========
  117. A framework for storing data in anonymous sessions.
  118. See the :ref:`sessions documentation <topics-http-sessions>`.
  119. sites
  120. =====
  121. A light framework that lets you operate multiple Web sites off of the same
  122. database and Django installation. It gives you hooks for associating objects to
  123. one or more sites.
  124. See the :ref:`sites documentation <ref-contrib-sites>`.
  125. sitemaps
  126. ========
  127. A framework for generating Google sitemap XML files.
  128. See the :ref:`sitemaps documentation <ref-contrib-sitemaps>`.
  129. syndication
  130. ===========
  131. A framework for generating syndication feeds, in RSS and Atom, quite easily.
  132. See the :ref:`syndication documentation <ref-contrib-syndication>`.
  133. webdesign
  134. =========
  135. Helpers and utilities targeted primarily at Web *designers* rather than
  136. Web *developers*.
  137. See the :ref:`Web design helpers documentation <ref-contrib-webdesign>`.
  138. Other add-ons
  139. =============
  140. If you have an idea for functionality to include in ``contrib``, let us know!
  141. Code it up, and post it to the `django-users mailing list`_.
  142. .. _django-users mailing list: http://groups.google.com/group/django-users