2009-06-17 23:57:27 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _index:
|
|
|
|
|
2008-03-27 15:03:52 +00:00
|
|
|
====================
|
2008-08-23 22:25:40 +00:00
|
|
|
Django documentation
|
2008-03-27 15:03:52 +00:00
|
|
|
====================
|
|
|
|
|
2012-09-11 00:27:50 +00:00
|
|
|
.. rubric:: Everything you need to know about Django.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
Getting help
|
|
|
|
============
|
|
|
|
|
|
|
|
Having trouble? We'd like to help!
|
|
|
|
|
2010-08-19 19:27:44 +00:00
|
|
|
* Try the :doc:`FAQ <faq/index>` -- it's got answers to many common questions.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
* Looking for specific information? Try the :ref:`genindex`, :ref:`modindex` or
|
2010-08-19 19:27:44 +00:00
|
|
|
the :doc:`detailed table of contents <contents>`.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2013-10-03 22:51:22 +00:00
|
|
|
* Search for information in the archives of the |django-users| mailing list, or
|
2008-09-10 04:53:44 +00:00
|
|
|
`post a question`_.
|
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
* Ask a question in the `#django IRC channel`_, or search the `IRC logs`_ to see
|
2010-11-08 20:37:52 +00:00
|
|
|
if it's been asked before.
|
2008-08-23 22:25:40 +00:00
|
|
|
|
|
|
|
* Report bugs with Django in our `ticket tracker`_.
|
|
|
|
|
2013-10-03 22:51:22 +00:00
|
|
|
.. _archives: http://groups.google.com/group/django-users/
|
2013-12-08 17:39:26 +00:00
|
|
|
.. _post a question: https://groups.google.com/d/forum/django-users
|
2008-08-23 22:25:40 +00:00
|
|
|
.. _#django IRC channel: irc://irc.freenode.net/django
|
2011-11-25 19:40:46 +00:00
|
|
|
.. _IRC logs: http://django-irc-logs.com/
|
2012-03-13 17:53:31 +00:00
|
|
|
.. _ticket tracker: https://code.djangoproject.com/
|
2008-03-27 15:03:52 +00:00
|
|
|
|
2008-08-23 22:25:40 +00:00
|
|
|
First steps
|
|
|
|
===========
|
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Are you new to Django or to programming? This is the place to start!
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **From scratch:**
|
|
|
|
:doc:`Overview <intro/overview>` |
|
|
|
|
:doc:`Installation <intro/install>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Tutorial:**
|
2015-05-11 23:43:40 +00:00
|
|
|
:doc:`Part 1: Requests and responses <intro/tutorial01>` |
|
|
|
|
:doc:`Part 2: Models and the admin site <intro/tutorial02>` |
|
2015-01-03 09:41:42 +00:00
|
|
|
:doc:`Part 3: Views and templates <intro/tutorial03>` |
|
|
|
|
:doc:`Part 4: Forms and generic views <intro/tutorial04>` |
|
|
|
|
:doc:`Part 5: Testing <intro/tutorial05>` |
|
2015-05-11 23:43:40 +00:00
|
|
|
:doc:`Part 6: Static files <intro/tutorial06>` |
|
|
|
|
:doc:`Part 7: Customizing the admin site <intro/tutorial07>`
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-10-30 19:53:56 +00:00
|
|
|
* **Advanced Tutorials:**
|
2012-10-31 00:09:49 +00:00
|
|
|
:doc:`How to write reusable apps <intro/reusable-apps>` |
|
|
|
|
:doc:`Writing your first patch for Django <intro/contributing>`
|
2012-10-30 19:53:56 +00:00
|
|
|
|
2008-11-18 07:33:35 +00:00
|
|
|
The model layer
|
|
|
|
===============
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-05 01:19:25 +00:00
|
|
|
Django provides an abstraction layer (the "models") for structuring and
|
2012-08-04 23:05:12 +00:00
|
|
|
manipulating the data of your Web application. Learn more about it below:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Models:**
|
|
|
|
:doc:`Model syntax <topics/db/models>` |
|
|
|
|
:doc:`Field types <ref/models/fields>` |
|
2014-05-16 20:40:00 +00:00
|
|
|
:doc:`Meta options <ref/models/options>` |
|
|
|
|
:doc:`Model class <ref/models/class>`
|
2011-10-14 00:12:01 +00:00
|
|
|
|
|
|
|
* **QuerySets:**
|
|
|
|
:doc:`Executing queries <topics/db/queries>` |
|
2013-09-06 17:57:25 +00:00
|
|
|
:doc:`QuerySet method reference <ref/models/querysets>` |
|
2014-06-11 15:09:10 +00:00
|
|
|
:doc:`Lookup expressions <ref/models/lookups>`
|
2011-10-14 00:12:01 +00:00
|
|
|
|
|
|
|
* **Model instances:**
|
|
|
|
:doc:`Instance methods <ref/models/instances>` |
|
|
|
|
:doc:`Accessing related objects <ref/models/relations>`
|
|
|
|
|
2013-07-25 13:45:38 +00:00
|
|
|
* **Migrations:**
|
2014-02-12 18:53:35 +00:00
|
|
|
:doc:`Introduction to Migrations<topics/migrations>` |
|
|
|
|
:doc:`Operations reference <ref/migration-operations>` |
|
2015-02-03 18:09:54 +00:00
|
|
|
:doc:`SchemaEditor <ref/schema-editor>` |
|
|
|
|
:doc:`Writing migrations <howto/writing-migrations>`
|
2013-07-25 13:45:38 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Advanced:**
|
|
|
|
:doc:`Managers <topics/db/managers>` |
|
|
|
|
:doc:`Raw SQL <topics/db/sql>` |
|
|
|
|
:doc:`Transactions <topics/db/transactions>` |
|
|
|
|
:doc:`Aggregation <topics/db/aggregation>` |
|
|
|
|
:doc:`Custom fields <howto/custom-model-fields>` |
|
2014-01-18 09:09:43 +00:00
|
|
|
:doc:`Multiple databases <topics/db/multi-db>` |
|
2013-12-25 13:13:18 +00:00
|
|
|
:doc:`Custom lookups <howto/custom-lookups>` |
|
2014-11-22 03:14:43 +00:00
|
|
|
:doc:`Query Expressions <ref/models/expressions>` |
|
2015-01-02 01:39:31 +00:00
|
|
|
:doc:`Conditional Expressions <ref/models/conditional-expressions>` |
|
2014-11-22 03:14:43 +00:00
|
|
|
:doc:`Database Functions <ref/models/database-functions>`
|
2011-10-14 00:12:01 +00:00
|
|
|
|
|
|
|
* **Other:**
|
|
|
|
:doc:`Supported databases <ref/databases>` |
|
|
|
|
:doc:`Legacy databases <howto/legacy-databases>` |
|
|
|
|
:doc:`Providing initial data <howto/initial-data>` |
|
2014-03-26 16:44:21 +00:00
|
|
|
:doc:`Optimize database access <topics/db/optimization>` |
|
|
|
|
:doc:`PostgreSQL specific features <ref/contrib/postgres/index>`
|
2008-08-23 22:25:40 +00:00
|
|
|
|
2008-11-18 07:33:35 +00:00
|
|
|
The view layer
|
|
|
|
==============
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-05 01:19:25 +00:00
|
|
|
Django has the concept of "views" to encapsulate the logic responsible for
|
2012-08-04 23:05:12 +00:00
|
|
|
processing a user's request and for returning the response. Find all you need
|
|
|
|
to know about views via the links below:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **The basics:**
|
|
|
|
:doc:`URLconfs <topics/http/urls>` |
|
|
|
|
:doc:`View functions <topics/http/views>` |
|
|
|
|
:doc:`Shortcuts <topics/http/shortcuts>` |
|
|
|
|
:doc:`Decorators <topics/http/decorators>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Reference:**
|
2013-03-07 19:15:39 +00:00
|
|
|
:doc:`Built-in Views <ref/views>` |
|
2011-10-14 00:12:01 +00:00
|
|
|
:doc:`Request/response objects <ref/request-response>` |
|
|
|
|
:doc:`TemplateResponse objects <ref/template-response>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **File uploads:**
|
|
|
|
:doc:`Overview <topics/http/file-uploads>` |
|
|
|
|
:doc:`File objects <ref/files/file>` |
|
|
|
|
:doc:`Storage API <ref/files/storage>` |
|
|
|
|
:doc:`Managing files <topics/files>` |
|
|
|
|
:doc:`Custom storage <howto/custom-file-storage>`
|
2009-06-17 14:09:56 +00:00
|
|
|
|
2012-06-11 08:34:00 +00:00
|
|
|
* **Class-based views:**
|
2012-08-20 03:42:57 +00:00
|
|
|
:doc:`Overview <topics/class-based-views/index>` |
|
|
|
|
:doc:`Built-in display views <topics/class-based-views/generic-display>` |
|
|
|
|
:doc:`Built-in editing views <topics/class-based-views/generic-editing>` |
|
|
|
|
:doc:`Using mixins <topics/class-based-views/mixins>` |
|
2012-09-01 13:20:38 +00:00
|
|
|
:doc:`API reference <ref/class-based-views/index>` |
|
|
|
|
:doc:`Flattened index<ref/class-based-views/flattened-index>`
|
2009-06-17 14:09:56 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Advanced:**
|
|
|
|
:doc:`Generating CSV <howto/outputting-csv>` |
|
|
|
|
:doc:`Generating PDF <howto/outputting-pdf>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Middleware:**
|
|
|
|
:doc:`Overview <topics/http/middleware>` |
|
|
|
|
:doc:`Built-in middleware classes <ref/middleware>`
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
The template layer
|
|
|
|
==================
|
|
|
|
|
|
|
|
The template layer provides a designer-friendly syntax for rendering the
|
|
|
|
information to be presented to the user. Learn how this syntax can be used by
|
|
|
|
designers and how it can be extended by programmers:
|
|
|
|
|
2015-01-03 15:10:12 +00:00
|
|
|
* **The basics:**
|
|
|
|
:doc:`Overview <topics/templates>`
|
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
* **For designers:**
|
2015-01-03 15:10:12 +00:00
|
|
|
:doc:`Language overview <ref/templates/language>` |
|
2012-08-04 23:05:12 +00:00
|
|
|
:doc:`Built-in tags and filters <ref/templates/builtins>` |
|
|
|
|
:doc:`Humanization <ref/contrib/humanize>`
|
|
|
|
|
|
|
|
* **For programmers:**
|
|
|
|
:doc:`Template API <ref/templates/api>` |
|
|
|
|
:doc:`Custom tags and filters <howto/custom-template-tags>`
|
|
|
|
|
2008-11-18 07:33:35 +00:00
|
|
|
Forms
|
|
|
|
=====
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Django provides a rich framework to facilitate the creation of forms and the
|
|
|
|
manipulation of form data.
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **The basics:**
|
|
|
|
:doc:`Overview <topics/forms/index>` |
|
|
|
|
:doc:`Form API <ref/forms/api>` |
|
|
|
|
:doc:`Built-in fields <ref/forms/fields>` |
|
|
|
|
:doc:`Built-in widgets <ref/forms/widgets>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Advanced:**
|
|
|
|
:doc:`Forms for models <topics/forms/modelforms>` |
|
|
|
|
:doc:`Integrating media <topics/forms/media>` |
|
|
|
|
:doc:`Formsets <topics/forms/formsets>` |
|
|
|
|
:doc:`Customizing validation <ref/forms/validation>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2008-11-18 07:33:35 +00:00
|
|
|
The development process
|
|
|
|
=======================
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Learn about the various components and tools to help you in the development and
|
|
|
|
testing of Django applications:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Settings:**
|
|
|
|
:doc:`Overview <topics/settings>` |
|
|
|
|
:doc:`Full list of settings <ref/settings>`
|
2009-03-31 19:43:32 +00:00
|
|
|
|
2013-12-24 14:40:12 +00:00
|
|
|
* **Applications:**
|
|
|
|
:doc:`Overview <ref/applications>`
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Exceptions:**
|
|
|
|
:doc:`Overview <ref/exceptions>`
|
2010-05-09 07:45:05 +00:00
|
|
|
|
2014-07-26 11:21:52 +00:00
|
|
|
* **django-admin and manage.py:**
|
2011-10-14 00:12:01 +00:00
|
|
|
:doc:`Overview <ref/django-admin>` |
|
|
|
|
:doc:`Adding custom commands <howto/custom-management-commands>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2012-12-22 00:59:06 +00:00
|
|
|
* **Testing:**
|
2012-12-22 15:08:22 +00:00
|
|
|
:doc:`Introduction <topics/testing/index>` |
|
2012-12-22 00:59:06 +00:00
|
|
|
:doc:`Writing and running tests <topics/testing/overview>` |
|
2014-05-11 02:27:09 +00:00
|
|
|
:doc:`Included testing tools <topics/testing/tools>` |
|
2013-05-12 20:29:34 +00:00
|
|
|
:doc:`Advanced topics <topics/testing/advanced>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Deployment:**
|
|
|
|
:doc:`Overview <howto/deployment/index>` |
|
2011-10-22 04:30:10 +00:00
|
|
|
:doc:`WSGI servers <howto/deployment/wsgi/index>` |
|
2013-03-07 19:15:39 +00:00
|
|
|
:doc:`Deploying static files <howto/static-files/deployment>` |
|
2011-10-14 00:12:01 +00:00
|
|
|
:doc:`Tracking code errors by email <howto/error-reporting>`
|
2008-09-10 04:53:44 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
The admin
|
|
|
|
=========
|
2008-03-27 15:03:52 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Find all you need to know about the automated admin interface, one of Django's
|
|
|
|
most popular features:
|
|
|
|
|
|
|
|
* :doc:`Admin site <ref/contrib/admin/index>`
|
|
|
|
* :doc:`Admin actions <ref/contrib/admin/actions>`
|
|
|
|
* :doc:`Admin documentation generator<ref/contrib/admin/admindocs>`
|
|
|
|
|
|
|
|
Security
|
|
|
|
========
|
|
|
|
|
|
|
|
Security is a topic of paramount importance in the development of Web
|
|
|
|
applications and Django provides multiple protection tools and mechanisms:
|
|
|
|
|
|
|
|
* :doc:`Security overview <topics/security>`
|
2013-09-19 05:57:02 +00:00
|
|
|
* :doc:`Disclosed security issues in Django <releases/security>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Clickjacking protection <ref/clickjacking>`
|
2014-10-31 22:39:46 +00:00
|
|
|
* :doc:`Cross Site Request Forgery protection <ref/csrf>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Cryptographic signing <topics/signing>`
|
2014-09-12 18:50:36 +00:00
|
|
|
* :ref:`Security Middleware <security-middleware>`
|
2012-08-04 23:05:12 +00:00
|
|
|
|
|
|
|
Internationalization and localization
|
|
|
|
=====================================
|
|
|
|
|
|
|
|
Django offers a robust internationalization and localization framework to
|
|
|
|
assist you in the development of applications for multiple languages and world
|
|
|
|
regions:
|
|
|
|
|
2013-01-25 16:50:37 +00:00
|
|
|
* :doc:`Overview <topics/i18n/index>` |
|
|
|
|
:doc:`Internationalization <topics/i18n/translation>` |
|
2013-12-04 13:26:03 +00:00
|
|
|
:ref:`Localization <how-to-create-language-files>` |
|
|
|
|
:doc:`Localized Web UI formatting and form input <topics/i18n/formatting>`
|
2013-01-25 16:50:37 +00:00
|
|
|
* :doc:`Time zones </topics/i18n/timezones>`
|
2012-08-04 23:05:12 +00:00
|
|
|
|
2013-09-20 22:21:49 +00:00
|
|
|
Performance and optimization
|
|
|
|
============================
|
|
|
|
|
|
|
|
There are a variety of techniques and tools that can help get your code running
|
|
|
|
more efficiently - faster, and using fewer system resources.
|
|
|
|
|
|
|
|
* :doc:`Performance and optimization overview <topics/performance>`
|
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Python compatibility
|
|
|
|
====================
|
|
|
|
|
|
|
|
Django aims to be compatible with multiple different flavors and versions of
|
|
|
|
Python:
|
|
|
|
|
|
|
|
* :doc:`Jython support <howto/jython>`
|
|
|
|
* :doc:`Python 3 compatibility <topics/python3>`
|
|
|
|
|
|
|
|
Geographic framework
|
|
|
|
====================
|
|
|
|
|
|
|
|
:doc:`GeoDjango <ref/contrib/gis/index>` intends to be a world-class geographic
|
|
|
|
Web framework. Its goal is to make it as easy as possible to build GIS Web
|
|
|
|
applications and harness the power of spatially enabled data.
|
|
|
|
|
|
|
|
Common Web application tools
|
|
|
|
============================
|
|
|
|
|
|
|
|
Django offers multiple tools commonly needed in the development of Web
|
|
|
|
applications:
|
|
|
|
|
2012-12-28 19:00:11 +00:00
|
|
|
* :doc:`Authentication <topics/auth/index>`
|
2012-08-04 23:05:12 +00:00
|
|
|
* :doc:`Caching <topics/cache>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Logging <topics/logging>`
|
2012-09-26 12:14:51 +00:00
|
|
|
* :doc:`Sending emails <topics/email>`
|
2012-08-04 23:05:12 +00:00
|
|
|
* :doc:`Syndication feeds (RSS/Atom) <ref/contrib/syndication>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Pagination <topics/pagination>`
|
2012-08-04 23:05:12 +00:00
|
|
|
* :doc:`Messages framework <ref/contrib/messages>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Serialization <topics/serialization>`
|
|
|
|
* :doc:`Sessions <topics/http/sessions>`
|
|
|
|
* :doc:`Sitemaps <ref/contrib/sitemaps>`
|
2012-08-04 23:05:12 +00:00
|
|
|
* :doc:`Static files management <ref/contrib/staticfiles>`
|
|
|
|
* :doc:`Data validation <ref/validators>`
|
|
|
|
|
|
|
|
Other core functionalities
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Learn about some other core functionalities of the Django framework:
|
|
|
|
|
|
|
|
* :doc:`Conditional content processing <topics/conditional-view-processing>`
|
|
|
|
* :doc:`Content types and generic relations <ref/contrib/contenttypes>`
|
|
|
|
* :doc:`Flatpages <ref/contrib/flatpages>`
|
|
|
|
* :doc:`Redirects <ref/contrib/redirects>`
|
|
|
|
* :doc:`Signals <topics/signals>`
|
2014-03-03 10:56:11 +00:00
|
|
|
* :doc:`System check framework <topics/checks>`
|
2012-08-04 23:05:12 +00:00
|
|
|
* :doc:`The sites framework <ref/contrib/sites>`
|
2011-10-14 00:12:01 +00:00
|
|
|
* :doc:`Unicode in Django <ref/unicode>`
|
2010-10-18 13:34:47 +00:00
|
|
|
|
2008-11-18 07:33:35 +00:00
|
|
|
The Django open-source project
|
|
|
|
==============================
|
2008-03-27 15:03:52 +00:00
|
|
|
|
2012-08-04 23:05:12 +00:00
|
|
|
Learn about the development process for the Django project itself and about how
|
|
|
|
you can contribute:
|
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Community:**
|
|
|
|
:doc:`How to get involved <internals/contributing/index>` |
|
|
|
|
:doc:`The release process <internals/release-process>` |
|
2014-07-13 14:49:45 +00:00
|
|
|
:doc:`Team organization <internals/organization>` |
|
2014-07-13 07:58:53 +00:00
|
|
|
:doc:`Meet the team <internals/team>` |
|
2014-07-13 14:49:45 +00:00
|
|
|
:doc:`Current roles <internals/roles>` |
|
2012-08-07 20:26:37 +00:00
|
|
|
:doc:`The Django source code repository <internals/git>` |
|
2013-10-03 22:51:22 +00:00
|
|
|
:doc:`Security policies <internals/security>` |
|
|
|
|
:doc:`Mailing lists <internals/mailing-lists>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Design philosophies:**
|
|
|
|
:doc:`Overview <misc/design-philosophies>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Documentation:**
|
|
|
|
:doc:`About this documentation <internals/contributing/writing-documentation>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Third-party distributions:**
|
|
|
|
:doc:`Overview <misc/distributions>`
|
2009-06-17 23:57:27 +00:00
|
|
|
|
2011-10-14 00:12:01 +00:00
|
|
|
* **Django over time:**
|
|
|
|
:doc:`API stability <misc/api-stability>` |
|
|
|
|
:doc:`Release notes and upgrading instructions <releases/index>` |
|
|
|
|
:doc:`Deprecation Timeline <internals/deprecation>`
|