2009-06-18 01:57:27 +02:00
|
|
|
|
2008-08-24 00:25:40 +02:00
|
|
|
.. _index:
|
|
|
|
|
2008-03-27 16:03:52 +01:00
|
|
|
====================
|
2008-08-24 00:25:40 +02:00
|
|
|
Django documentation
|
2008-03-27 16:03:52 +01:00
|
|
|
====================
|
|
|
|
|
2012-09-11 02:27:50 +02:00
|
|
|
.. rubric:: Everything you need to know about Django.
|
2008-08-24 00:25:40 +02:00
|
|
|
|
|
|
|
Getting help
|
|
|
|
============
|
|
|
|
|
|
|
|
Having trouble? We'd like to help!
|
|
|
|
|
2010-08-19 21:27:44 +02:00
|
|
|
* Try the :doc:`FAQ <faq/index>` -- it's got answers to many common questions.
|
2008-08-24 00:25:40 +02:00
|
|
|
|
|
|
|
* Looking for specific information? Try the :ref:`genindex`, :ref:`modindex` or
|
2010-08-19 21:27:44 +02:00
|
|
|
the :doc:`detailed table of contents <contents>`.
|
2008-08-24 00:25:40 +02:00
|
|
|
|
|
|
|
* Search for information in the `archives of the django-users mailing list`_, or
|
2008-09-10 06:53:44 +02:00
|
|
|
`post a question`_.
|
|
|
|
|
2008-08-24 00:25:40 +02:00
|
|
|
* Ask a question in the `#django IRC channel`_, or search the `IRC logs`_ to see
|
2010-11-08 21:37:52 +01:00
|
|
|
if it's been asked before.
|
2008-08-24 00:25:40 +02:00
|
|
|
|
|
|
|
* Report bugs with Django in our `ticket tracker`_.
|
|
|
|
|
|
|
|
.. _archives of the django-users mailing list: http://groups.google.com/group/django-users/
|
|
|
|
.. _post a question: http://groups.google.com/group/django-users/
|
|
|
|
.. _#django IRC channel: irc://irc.freenode.net/django
|
2011-11-25 20:40:46 +01:00
|
|
|
.. _IRC logs: http://django-irc-logs.com/
|
2012-03-13 18:53:31 +01:00
|
|
|
.. _ticket tracker: https://code.djangoproject.com/
|
2008-03-27 16:03:52 +01:00
|
|
|
|
2008-08-24 00:25:40 +02:00
|
|
|
First steps
|
|
|
|
===========
|
|
|
|
|
2012-08-05 01:05:12 +02:00
|
|
|
Are you new to Django or to programming? This is the place to start!
|
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **From scratch:**
|
|
|
|
:doc:`Overview <intro/overview>` |
|
|
|
|
:doc:`Installation <intro/install>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Tutorial:**
|
|
|
|
:doc:`Part 1 <intro/tutorial01>` |
|
|
|
|
:doc:`Part 2 <intro/tutorial02>` |
|
|
|
|
:doc:`Part 3 <intro/tutorial03>` |
|
2012-12-15 14:03:17 +01:00
|
|
|
:doc:`Part 4 <intro/tutorial04>` |
|
2013-03-04 12:05:11 +01:00
|
|
|
:doc:`Part 5 <intro/tutorial05>` |
|
|
|
|
:doc:`Part 6 <intro/tutorial06>`
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-10-30 20:53:56 +01:00
|
|
|
* **Advanced Tutorials:**
|
2012-10-31 01:09:49 +01:00
|
|
|
:doc:`How to write reusable apps <intro/reusable-apps>` |
|
|
|
|
:doc:`Writing your first patch for Django <intro/contributing>`
|
2012-10-30 20:53:56 +01:00
|
|
|
|
2008-11-18 08:33:35 +01:00
|
|
|
The model layer
|
|
|
|
===============
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 03:19:25 +02:00
|
|
|
Django provides an abstraction layer (the "models") for structuring and
|
2012-08-05 01:05:12 +02:00
|
|
|
manipulating the data of your Web application. Learn more about it below:
|
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Models:**
|
|
|
|
:doc:`Model syntax <topics/db/models>` |
|
|
|
|
:doc:`Field types <ref/models/fields>` |
|
|
|
|
:doc:`Meta options <ref/models/options>`
|
|
|
|
|
|
|
|
* **QuerySets:**
|
|
|
|
:doc:`Executing queries <topics/db/queries>` |
|
|
|
|
:doc:`QuerySet method reference <ref/models/querysets>`
|
|
|
|
|
|
|
|
* **Model instances:**
|
|
|
|
:doc:`Instance methods <ref/models/instances>` |
|
|
|
|
:doc:`Accessing related objects <ref/models/relations>`
|
|
|
|
|
|
|
|
* **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>` |
|
|
|
|
:doc:`Multiple databases <topics/db/multi-db>`
|
|
|
|
|
|
|
|
* **Other:**
|
|
|
|
:doc:`Supported databases <ref/databases>` |
|
|
|
|
:doc:`Legacy databases <howto/legacy-databases>` |
|
|
|
|
:doc:`Providing initial data <howto/initial-data>` |
|
|
|
|
:doc:`Optimize database access <topics/db/optimization>`
|
2008-08-24 00:25:40 +02:00
|
|
|
|
2008-11-18 08:33:35 +01:00
|
|
|
The view layer
|
|
|
|
==============
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 03:19:25 +02:00
|
|
|
Django has the concept of "views" to encapsulate the logic responsible for
|
2012-08-05 01:05:12 +02: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 02:12:01 +02: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-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Reference:**
|
2013-03-07 20:15:39 +01:00
|
|
|
:doc:`Built-in Views <ref/views>` |
|
2011-10-14 02:12:01 +02:00
|
|
|
:doc:`Request/response objects <ref/request-response>` |
|
|
|
|
:doc:`TemplateResponse objects <ref/template-response>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02: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 16:09:56 +02:00
|
|
|
|
2012-06-11 10:34:00 +02:00
|
|
|
* **Class-based views:**
|
2012-08-20 05:42:57 +02: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 15:20:38 +02:00
|
|
|
:doc:`API reference <ref/class-based-views/index>` |
|
|
|
|
:doc:`Flattened index<ref/class-based-views/flattened-index>`
|
2009-06-17 16:09:56 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Advanced:**
|
|
|
|
:doc:`Generating CSV <howto/outputting-csv>` |
|
|
|
|
:doc:`Generating PDF <howto/outputting-pdf>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Middleware:**
|
|
|
|
:doc:`Overview <topics/http/middleware>` |
|
|
|
|
:doc:`Built-in middleware classes <ref/middleware>`
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 01:05:12 +02: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:
|
|
|
|
|
|
|
|
* **For designers:**
|
|
|
|
:doc:`Syntax overview <topics/templates>` |
|
|
|
|
:doc:`Built-in tags and filters <ref/templates/builtins>` |
|
|
|
|
:doc:`Web design helpers <ref/contrib/webdesign>` |
|
|
|
|
: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 08:33:35 +01:00
|
|
|
Forms
|
|
|
|
=====
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 01:05:12 +02:00
|
|
|
Django provides a rich framework to facilitate the creation of forms and the
|
|
|
|
manipulation of form data.
|
|
|
|
|
2011-10-14 02:12:01 +02: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-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02: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-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Extras:**
|
|
|
|
:doc:`Form preview <ref/contrib/formtools/form-preview>` |
|
|
|
|
:doc:`Form wizard <ref/contrib/formtools/form-wizard>`
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2008-11-18 08:33:35 +01:00
|
|
|
The development process
|
|
|
|
=======================
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 01:05:12 +02:00
|
|
|
Learn about the various components and tools to help you in the development and
|
|
|
|
testing of Django applications:
|
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Settings:**
|
|
|
|
:doc:`Overview <topics/settings>` |
|
|
|
|
:doc:`Full list of settings <ref/settings>`
|
2009-03-31 21:43:32 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Exceptions:**
|
|
|
|
:doc:`Overview <ref/exceptions>`
|
2010-05-09 09:45:05 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **django-admin.py and manage.py:**
|
|
|
|
:doc:`Overview <ref/django-admin>` |
|
|
|
|
:doc:`Adding custom commands <howto/custom-management-commands>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2012-12-22 01:59:06 +01:00
|
|
|
* **Testing:**
|
2012-12-22 16:08:22 +01:00
|
|
|
:doc:`Introduction <topics/testing/index>` |
|
2012-12-22 01:59:06 +01:00
|
|
|
:doc:`Writing and running tests <topics/testing/overview>` |
|
|
|
|
:doc:`Advanced topics <topics/testing/advanced>` |
|
|
|
|
:doc:`Doctests <topics/testing/doctests>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Deployment:**
|
|
|
|
:doc:`Overview <howto/deployment/index>` |
|
2011-10-22 06:30:10 +02:00
|
|
|
:doc:`WSGI servers <howto/deployment/wsgi/index>` |
|
2011-10-14 02:12:01 +02:00
|
|
|
:doc:`FastCGI/SCGI/AJP <howto/deployment/fastcgi>` |
|
2013-03-07 20:15:39 +01:00
|
|
|
:doc:`Deploying static files <howto/static-files/deployment>` |
|
2011-10-14 02:12:01 +02:00
|
|
|
:doc:`Tracking code errors by email <howto/error-reporting>`
|
2008-09-10 06:53:44 +02:00
|
|
|
|
2012-08-05 01:05:12 +02:00
|
|
|
The admin
|
|
|
|
=========
|
2008-03-27 16:03:52 +01:00
|
|
|
|
2012-08-05 01:05:12 +02: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>`
|
2011-10-14 02:12:01 +02:00
|
|
|
* :doc:`Clickjacking protection <ref/clickjacking>`
|
|
|
|
* :doc:`Cross Site Request Forgery protection <ref/contrib/csrf>`
|
|
|
|
* :doc:`Cryptographic signing <topics/signing>`
|
2012-08-05 01:05:12 +02: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 17:50:37 +01:00
|
|
|
* :doc:`Overview <topics/i18n/index>` |
|
|
|
|
:doc:`Internationalization <topics/i18n/translation>` |
|
|
|
|
:ref:`Localization <how-to-create-language-files>`
|
2012-12-24 23:10:40 +01:00
|
|
|
* :doc:`"Local flavor" <topics/localflavor>`
|
2013-01-25 17:50:37 +01:00
|
|
|
* :doc:`Time zones </topics/i18n/timezones>`
|
2012-08-05 01:05:12 +02: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 20:00:11 +01:00
|
|
|
* :doc:`Authentication <topics/auth/index>`
|
2012-08-05 01:05:12 +02:00
|
|
|
* :doc:`Caching <topics/cache>`
|
2011-10-14 02:12:01 +02:00
|
|
|
* :doc:`Logging <topics/logging>`
|
2012-09-26 14:14:51 +02:00
|
|
|
* :doc:`Sending emails <topics/email>`
|
2012-08-05 01:05:12 +02:00
|
|
|
* :doc:`Syndication feeds (RSS/Atom) <ref/contrib/syndication>`
|
2011-10-14 02:12:01 +02:00
|
|
|
* :doc:`Pagination <topics/pagination>`
|
2012-08-05 01:05:12 +02:00
|
|
|
* :doc:`Messages framework <ref/contrib/messages>`
|
2011-10-14 02:12:01 +02:00
|
|
|
* :doc:`Serialization <topics/serialization>`
|
|
|
|
* :doc:`Sessions <topics/http/sessions>`
|
|
|
|
* :doc:`Sitemaps <ref/contrib/sitemaps>`
|
2012-08-05 01:05:12 +02: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>`
|
|
|
|
* :doc:`The sites framework <ref/contrib/sites>`
|
2011-10-14 02:12:01 +02:00
|
|
|
* :doc:`Unicode in Django <ref/unicode>`
|
2010-10-18 15:34:47 +02:00
|
|
|
|
2008-11-18 08:33:35 +01:00
|
|
|
The Django open-source project
|
|
|
|
==============================
|
2008-03-27 16:03:52 +01:00
|
|
|
|
2012-08-05 01:05:12 +02:00
|
|
|
Learn about the development process for the Django project itself and about how
|
|
|
|
you can contribute:
|
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Community:**
|
|
|
|
:doc:`How to get involved <internals/contributing/index>` |
|
|
|
|
:doc:`The release process <internals/release-process>` |
|
|
|
|
:doc:`Team of committers <internals/committers>` |
|
2012-08-07 22:26:37 +02:00
|
|
|
:doc:`The Django source code repository <internals/git>` |
|
|
|
|
:doc:`Security policies <internals/security>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Design philosophies:**
|
|
|
|
:doc:`Overview <misc/design-philosophies>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Documentation:**
|
|
|
|
:doc:`About this documentation <internals/contributing/writing-documentation>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Third-party distributions:**
|
|
|
|
:doc:`Overview <misc/distributions>`
|
2009-06-18 01:57:27 +02:00
|
|
|
|
2011-10-14 02:12:01 +02:00
|
|
|
* **Django over time:**
|
|
|
|
:doc:`API stability <misc/api-stability>` |
|
|
|
|
:doc:`Release notes and upgrading instructions <releases/index>` |
|
|
|
|
:doc:`Deprecation Timeline <internals/deprecation>`
|