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