django/docs/ref/contrib/index.txt

183 lines
4.2 KiB
Plaintext
Raw Normal View History

====================
``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.redirects'``) to your :setting:`INSTALLED_APPS` setting
and re-run ``manage.py migrate``.
.. _"batteries included" philosophy: http://docs.python.org/tutorial/stdlib.html#batteries-included
.. toctree::
:maxdepth: 1
admin/index
auth
contenttypes
csrf
flatpages
formtools/index
gis/index
humanize
messages
Added array field support for PostgreSQL. The first part of django.contrib.postgres, including model and two form fields for arrays of other data types. This commit is formed of the following work: Add shell of postgres app and test handling. First draft of array fields. Use recursive deconstruction. Stop creating classes at lookup time. Add validation and size parameter. Add contained_by lookup. Add SimpleArrayField for forms. Add SplitArrayField (mainly for admin). Fix prepare_value for SimpleArrayField. Stop using MultiValueField and MultiWidget. They don't play nice with flexible sizes. Add basics of admin integration. Missing: - Tests - Fully working js Add reference document for django.contrib.postgres.fields.ArrayField. Various performance and style tweaks. Fix internal docs link, formalise code snippets. Remove the admin code for now. It needs a better way of handing JS widgets in the admin as a whole before it is easy to write. In particular there are serious issues involving DateTimePicker when used in an array. Add a test for nested array fields with different delimiters. This will be a documented pattern so having a test for it is useful. Add docs for SimpleArrayField. Add docs for SplitArrayField. Remove admin related code for now. definition -> description Fix typo. Py3 errors. Avoid using regexes where they're not needed. Allow passing tuples by the programmer. Add some more tests for multidimensional arrays. Also fix slicing as much as it can be fixed. Simplify SplitArrayWidget's data loading. If we aren't including the variable size one, we don't need to search like this.
2014-03-27 00:44:21 +08:00
postgres/index
redirects
sitemaps
sites
staticfiles
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/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>`.
messages
========
A framework for storing and retrieving temporary cookie- or session-based
messages
See the :doc:`messages documentation </ref/contrib/messages>`.
Added array field support for PostgreSQL. The first part of django.contrib.postgres, including model and two form fields for arrays of other data types. This commit is formed of the following work: Add shell of postgres app and test handling. First draft of array fields. Use recursive deconstruction. Stop creating classes at lookup time. Add validation and size parameter. Add contained_by lookup. Add SimpleArrayField for forms. Add SplitArrayField (mainly for admin). Fix prepare_value for SimpleArrayField. Stop using MultiValueField and MultiWidget. They don't play nice with flexible sizes. Add basics of admin integration. Missing: - Tests - Fully working js Add reference document for django.contrib.postgres.fields.ArrayField. Various performance and style tweaks. Fix internal docs link, formalise code snippets. Remove the admin code for now. It needs a better way of handing JS widgets in the admin as a whole before it is easy to write. In particular there are serious issues involving DateTimePicker when used in an array. Add a test for nested array fields with different delimiters. This will be a documented pattern so having a test for it is useful. Add docs for SimpleArrayField. Add docs for SplitArrayField. Remove admin related code for now. definition -> description Fix typo. Py3 errors. Avoid using regexes where they're not needed. Allow passing tuples by the programmer. Add some more tests for multidimensional arrays. Also fix slicing as much as it can be fixed. Simplify SplitArrayWidget's data loading. If we aren't including the variable size one, we don't need to search like this.
2014-03-27 00:44:21 +08:00
postgres
========
A collection of PostgreSQL specific features.
See the :doc:`contrib.postgres documentation </ref/contrib/postgres/index>`.
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.