mirror of
https://github.com/django/django.git
synced 2024-11-18 07:26:04 +00:00
728effcfbd
Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
238 lines
6.4 KiB
Plaintext
238 lines
6.4 KiB
Plaintext
====================
|
|
``contrib`` packages
|
|
====================
|
|
|
|
Django aims to follow Python's `"batteries included" philosophy`_. It ships
|
|
with a variety of extra, optional tools that solve common Web-development
|
|
problems.
|
|
|
|
This code lives in ``django/contrib`` in the Django distribution. This document
|
|
gives a rundown of the packages in ``contrib``, along with any dependencies
|
|
those packages have.
|
|
|
|
.. admonition:: Note
|
|
|
|
For most of these add-ons -- specifically, the add-ons that include either
|
|
models or template tags -- you'll need to add the package name (e.g.,
|
|
``'django.contrib.admin'``) to your ``INSTALLED_APPS`` setting and re-run
|
|
``manage.py syncdb``.
|
|
|
|
.. _"batteries included" philosophy: http://docs.python.org/tutorial/stdlib.html#batteries-included
|
|
|
|
.. toctree::
|
|
:maxdepth: 1
|
|
|
|
admin/index
|
|
auth
|
|
comments/index
|
|
contenttypes
|
|
csrf
|
|
databrowse
|
|
flatpages
|
|
formtools/index
|
|
gis/index
|
|
humanize
|
|
localflavor
|
|
messages
|
|
redirects
|
|
sitemaps
|
|
sites
|
|
syndication
|
|
webdesign
|
|
|
|
admin
|
|
=====
|
|
|
|
The automatic Django administrative interface. For more information, see
|
|
:doc:`Tutorial 2 </intro/tutorial02>` and the
|
|
:doc:`admin documentation </ref/contrib/admin/index>`.
|
|
|
|
Requires the auth_ and contenttypes_ contrib packages to be installed.
|
|
|
|
auth
|
|
====
|
|
|
|
Django's authentication framework.
|
|
|
|
See :doc:`/topics/auth`.
|
|
|
|
comments
|
|
========
|
|
|
|
.. versionchanged:: 1.0
|
|
The comments application has been rewriten. See :doc:`/ref/contrib/comments/upgrade`
|
|
for information on howto upgrade.
|
|
|
|
A simple yet flexible comments system. See :doc:`/ref/contrib/comments/index`.
|
|
|
|
contenttypes
|
|
============
|
|
|
|
A light framework for hooking into "types" of content, where each installed
|
|
Django model is a separate content type.
|
|
|
|
See the :doc:`contenttypes documentation </ref/contrib/contenttypes>`.
|
|
|
|
csrf
|
|
====
|
|
|
|
A middleware for preventing Cross Site Request Forgeries
|
|
|
|
See the :doc:`csrf documentation </ref/contrib/csrf>`.
|
|
|
|
flatpages
|
|
=========
|
|
|
|
A framework for managing simple "flat" HTML content in a database.
|
|
|
|
See the :doc:`flatpages documentation </ref/contrib/flatpages>`.
|
|
|
|
Requires the sites_ contrib package to be installed as well.
|
|
|
|
formtools
|
|
=========
|
|
|
|
A set of high-level abstractions for Django forms (django.forms).
|
|
|
|
django.contrib.formtools.preview
|
|
--------------------------------
|
|
|
|
An abstraction of the following workflow:
|
|
|
|
"Display an HTML form, force a preview, then do something with the submission."
|
|
|
|
See the :doc:`form preview documentation </ref/contrib/formtools/form-preview>`.
|
|
|
|
django.contrib.formtools.wizard
|
|
--------------------------------
|
|
|
|
Splits forms across multiple Web pages.
|
|
|
|
See the :doc:`form wizard documentation </ref/contrib/formtools/form-wizard>`.
|
|
|
|
gis
|
|
====
|
|
|
|
A world-class geospatial framework built on top of Django, that enables
|
|
storage, manipulation and display of spatial data.
|
|
|
|
See the :doc:`/ref/contrib/gis/index` documentation for more.
|
|
|
|
humanize
|
|
========
|
|
|
|
A set of Django template filters useful for adding a "human touch" to data.
|
|
|
|
See the :doc:`humanize documentation </ref/contrib/humanize>`.
|
|
|
|
localflavor
|
|
===========
|
|
|
|
A collection of various Django snippets that are useful only for a particular
|
|
country or culture. For example, ``django.contrib.localflavor.us.forms``
|
|
contains a ``USZipCodeField`` that you can use to validate U.S. zip codes.
|
|
|
|
See the :doc:`localflavor documentation </ref/contrib/localflavor>`.
|
|
|
|
.. _ref-contrib-markup:
|
|
|
|
markup
|
|
======
|
|
|
|
A collection of template filters that implement common markup languages:
|
|
|
|
* ``textile`` -- implements `Textile`_ -- requires `PyTextile`_
|
|
* ``markdown`` -- implements `Markdown`_ -- requires `Python-markdown`_
|
|
* ``restructuredtext`` -- implements `ReST (ReStructured Text)`_
|
|
-- requires `doc-utils`_
|
|
|
|
In each case, the filter expects formatted markup as a string and returns a
|
|
string representing the marked-up text. For example, the ``textile`` filter
|
|
converts text that is marked-up in Textile format to HTML.
|
|
|
|
To activate these filters, add ``'django.contrib.markup'`` to your
|
|
:setting:`INSTALLED_APPS` setting. Once you've done that, use
|
|
``{% load markup %}`` in a template, and you'll have access to these filters.
|
|
For more documentation, read the source code in
|
|
:file:`django/contrib/markup/templatetags/markup.py`.
|
|
|
|
.. _Textile: http://en.wikipedia.org/wiki/Textile_%28markup_language%29
|
|
.. _Markdown: http://en.wikipedia.org/wiki/Markdown
|
|
.. _ReST (ReStructured Text): http://en.wikipedia.org/wiki/ReStructuredText
|
|
.. _PyTextile: http://loopcore.com/python-textile/
|
|
.. _Python-markdown: http://www.freewisdom.org/projects/python-markdown
|
|
.. _doc-utils: http://docutils.sf.net/
|
|
|
|
ReStructured Text
|
|
-----------------
|
|
|
|
When using the `restructuredtext` markup filter you can define a :setting:`RESTRUCTUREDTEXT_FORMAT_SETTINGS`
|
|
in your django settings to override the default writer settings. See the `restructuredtext writer settings`_ for
|
|
details on what these settings are.
|
|
|
|
.. _restructuredtext writer settings: http://docutils.sourceforge.net/docs/user/config.html#html4css1-writer
|
|
|
|
messages
|
|
========
|
|
|
|
.. versionchanged:: 1.2
|
|
The messages framework was added.
|
|
|
|
A framework for storing and retrieving temporary cookie- or session-based
|
|
messages
|
|
|
|
See the :doc:`messages documentation </ref/contrib/messages>`.
|
|
|
|
redirects
|
|
=========
|
|
|
|
A framework for managing redirects.
|
|
|
|
See the :doc:`redirects documentation </ref/contrib/redirects>`.
|
|
|
|
sessions
|
|
========
|
|
|
|
A framework for storing data in anonymous sessions.
|
|
|
|
See the :doc:`sessions documentation </topics/http/sessions>`.
|
|
|
|
sites
|
|
=====
|
|
|
|
A light framework that lets you operate multiple Web sites off of the same
|
|
database and Django installation. It gives you hooks for associating objects to
|
|
one or more sites.
|
|
|
|
See the :doc:`sites documentation </ref/contrib/sites>`.
|
|
|
|
sitemaps
|
|
========
|
|
|
|
A framework for generating Google sitemap XML files.
|
|
|
|
See the :doc:`sitemaps documentation </ref/contrib/sitemaps>`.
|
|
|
|
syndication
|
|
===========
|
|
|
|
A framework for generating syndication feeds, in RSS and Atom, quite easily.
|
|
|
|
See the :doc:`syndication documentation </ref/contrib/syndication>`.
|
|
|
|
webdesign
|
|
=========
|
|
|
|
Helpers and utilities targeted primarily at Web *designers* rather than
|
|
Web *developers*.
|
|
|
|
See the :doc:`Web design helpers documentation </ref/contrib/webdesign>`.
|
|
|
|
Other add-ons
|
|
=============
|
|
|
|
If you have an idea for functionality to include in ``contrib``, let us know!
|
|
Code it up, and post it to the `django-users mailing list`_.
|
|
|
|
.. _django-users mailing list: http://groups.google.com/group/django-users
|