---
title: "Django documentation"
version: 2.2
locale: en
source: https://docs.djangoproject.com/en/2.2/
canonical: https://djangodocs.dev/en/2.2/
---
# Django documentation

**Everything you need to know about Django.**

## Getting help

Having trouble? We’d like to help!

- Try the [FAQ](/en/2.2/faq/) – it’s got answers to many common questions.
- Looking for specific information? Try the [Index](/en/2.2/genindex/), [Module Index](/en/2.2/py-modindex/) or
  the [detailed table of contents](/en/2.2/contents/).
- Search for information in the archives of the [django-users](/en/2.2/internals/mailing-lists/#django-users-mailing-list) mailing list, or
  [post a question](https://groups.google.com/d/forum/django-users).
- Ask a question in the [#django IRC channel](irc://irc.libera.chat/django).
- Report bugs with Django in our [ticket tracker](https://code.djangoproject.com/).

## How the documentation is organized

Django has a lot of documentation. A high-level overview of how it’s organized
will help you know where to look for certain things:

- [Tutorials](/en/2.2/intro/) take you by the hand through a series of
  steps to create a Web application. Start here if you’re new to Django or Web
  application development. Also look at the “[First steps](#index-first-steps)” below.
- [Topic guides](/en/2.2/topics/) discuss key topics and concepts at a
  fairly high level and provide useful background information and explanation.
- [Reference guides](/en/2.2/ref/) contain technical reference for APIs and
  other aspects of Django’s machinery. They describe how it works and how to
  use it but assume that you have a basic understanding of key concepts.
- [How-to guides](/en/2.2/howto/) are recipes. They guide you through the
  steps involved in addressing key problems and use-cases. They are more
  advanced than tutorials and assume some knowledge of how Django works.

## First steps

Are you new to Django or to programming? This is the place to start!

- **From scratch:**
  [Overview](/en/2.2/intro/overview/) |
  [Installation](/en/2.2/intro/install/)
- **Tutorial:**
  [Part 1: Requests and responses](/en/2.2/intro/tutorial01/) |
  [Part 2: Models and the admin site](/en/2.2/intro/tutorial02/) |
  [Part 3: Views and templates](/en/2.2/intro/tutorial03/) |
  [Part 4: Forms and generic views](/en/2.2/intro/tutorial04/) |
  [Part 5: Testing](/en/2.2/intro/tutorial05/) |
  [Part 6: Static files](/en/2.2/intro/tutorial06/) |
  [Part 7: Customizing the admin site](/en/2.2/intro/tutorial07/)
- **Advanced Tutorials:**
  [How to write reusable apps](/en/2.2/intro/reusable-apps/) |
  [Writing your first patch for Django](/en/2.2/intro/contributing/)

## The model layer

Django provides an abstraction layer (the “models”) for structuring and
manipulating the data of your Web application. Learn more about it below:

- **Models:**
  [Introduction to models](/en/2.2/topics/db/models/) |
  [Field types](/en/2.2/ref/models/fields/) |
  [Indexes](/en/2.2/ref/models/indexes/) |
  [Meta options](/en/2.2/ref/models/options/) |
  [Model class](/en/2.2/ref/models/class/)
- **QuerySets:**
  [Making queries](/en/2.2/topics/db/queries/) |
  [QuerySet method reference](/en/2.2/ref/models/querysets/) |
  [Lookup expressions](/en/2.2/ref/models/lookups/)
- **Model instances:**
  [Instance methods](/en/2.2/ref/models/instances/) |
  [Accessing related objects](/en/2.2/ref/models/relations/)
- **Migrations:**
  [Introduction to Migrations](/en/2.2/topics/migrations/) |
  [Operations reference](/en/2.2/ref/migration-operations/) |
  [SchemaEditor](/en/2.2/ref/schema-editor/) |
  [Writing migrations](/en/2.2/howto/writing-migrations/)
- **Advanced:**
  [Managers](/en/2.2/topics/db/managers/) |
  [Raw SQL](/en/2.2/topics/db/sql/) |
  [Transactions](/en/2.2/topics/db/transactions/) |
  [Aggregation](/en/2.2/topics/db/aggregation/) |
  [Search](/en/2.2/topics/db/search/) |
  [Custom fields](/en/2.2/howto/custom-model-fields/) |
  [Multiple databases](/en/2.2/topics/db/multi-db/) |
  [Custom lookups](/en/2.2/howto/custom-lookups/) |
  [Query Expressions](/en/2.2/ref/models/expressions/) |
  [Conditional Expressions](/en/2.2/ref/models/conditional-expressions/) |
  [Database Functions](/en/2.2/ref/models/database-functions/)
- **Other:**
  [Supported databases](/en/2.2/ref/databases/) |
  [Legacy databases](/en/2.2/howto/legacy-databases/) |
  [Providing initial data](/en/2.2/howto/initial-data/) |
  [Optimize database access](/en/2.2/topics/db/optimization/) |
  [PostgreSQL specific features](/en/2.2/ref/contrib/postgres/)

## The view layer

Django has the concept of “views” to encapsulate the logic responsible for
processing a user’s request and for returning the response. Find all you need
to know about views via the links below:

- **The basics:**
  [URLconfs](/en/2.2/topics/http/urls/) |
  [View functions](/en/2.2/topics/http/views/) |
  [Shortcuts](/en/2.2/topics/http/shortcuts/) |
  [Decorators](/en/2.2/topics/http/decorators/)
- **Reference:**
  [Built-in Views](/en/2.2/ref/views/) |
  [Request/response objects](/en/2.2/ref/request-response/) |
  [TemplateResponse objects](/en/2.2/ref/template-response/)
- **File uploads:**
  [Overview](/en/2.2/topics/http/file-uploads/) |
  [File objects](/en/2.2/ref/files/file/) |
  [Storage API](/en/2.2/ref/files/storage/) |
  [Managing files](/en/2.2/topics/files/) |
  [Custom storage](/en/2.2/howto/custom-file-storage/)
- **Class-based views:**
  [Overview](/en/2.2/topics/class-based-views/) |
  [Built-in display views](/en/2.2/topics/class-based-views/generic-display/) |
  [Built-in editing views](/en/2.2/topics/class-based-views/generic-editing/) |
  [Using mixins](/en/2.2/topics/class-based-views/mixins/) |
  [API reference](/en/2.2/ref/class-based-views/) |
  [Flattened index](/en/2.2/ref/class-based-views/flattened-index/)
- **Advanced:**
  [Generating CSV](/en/2.2/howto/outputting-csv/) |
  [Generating PDF](/en/2.2/howto/outputting-pdf/)
- **Middleware:**
  [Overview](/en/2.2/topics/http/middleware/) |
  [Built-in middleware classes](/en/2.2/ref/middleware/)

## 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:

- **The basics:**
  [Overview](/en/2.2/topics/templates/)
- **For designers:**
  [Language overview](/en/2.2/ref/templates/language/) |
  [Built-in tags and filters](/en/2.2/ref/templates/builtins/) |
  [Humanization](/en/2.2/ref/contrib/humanize/)
- **For programmers:**
  [Template API](/en/2.2/ref/templates/api/) |
  [Custom tags and filters](/en/2.2/howto/custom-template-tags/)

## Forms

Django provides a rich framework to facilitate the creation of forms and the
manipulation of form data.

- **The basics:**
  [Overview](/en/2.2/topics/forms/) |
  [Form API](/en/2.2/ref/forms/api/) |
  [Built-in fields](/en/2.2/ref/forms/fields/) |
  [Built-in widgets](/en/2.2/ref/forms/widgets/)
- **Advanced:**
  [Forms for models](/en/2.2/topics/forms/modelforms/) |
  [Integrating media](/en/2.2/topics/forms/media/) |
  [Formsets](/en/2.2/topics/forms/formsets/) |
  [Customizing validation](/en/2.2/ref/forms/validation/)

## The development process

Learn about the various components and tools to help you in the development and
testing of Django applications:

- **Settings:**
  [Overview](/en/2.2/topics/settings/) |
  [Full list of settings](/en/2.2/ref/settings/)
- **Applications:**
  [Overview](/en/2.2/ref/applications/)
- **Exceptions:**
  [Overview](/en/2.2/ref/exceptions/)
- **django-admin and manage.py:**
  [Overview](/en/2.2/ref/django-admin/) |
  [Adding custom commands](/en/2.2/howto/custom-management-commands/)
- **Testing:**
  [Introduction](/en/2.2/topics/testing/) |
  [Writing and running tests](/en/2.2/topics/testing/overview/) |
  [Included testing tools](/en/2.2/topics/testing/tools/) |
  [Advanced topics](/en/2.2/topics/testing/advanced/)
- **Deployment:**
  [Overview](/en/2.2/howto/deployment/) |
  [WSGI servers](/en/2.2/howto/deployment/wsgi/) |
  [Deploying static files](/en/2.2/howto/static-files/deployment/) |
  [Tracking code errors by email](/en/2.2/howto/error-reporting/) |
  [Deployment checklist](/en/2.2/howto/deployment/checklist/)

## The admin

Find all you need to know about the automated admin interface, one of Django’s
most popular features:

- [Admin site](/en/2.2/ref/contrib/admin/)
- [Admin actions](/en/2.2/ref/contrib/admin/actions/)
- [Admin documentation generator](/en/2.2/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:

- [Security overview](/en/2.2/topics/security/)
- [Disclosed security issues in Django](/en/2.2/releases/security/)
- [Clickjacking protection](/en/2.2/ref/clickjacking/)
- [Cross Site Request Forgery protection](/en/2.2/ref/csrf/)
- [Cryptographic signing](/en/2.2/topics/signing/)
- [Security Middleware](/en/2.2/ref/middleware/#security-middleware)

## 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:

- [Overview](/en/2.2/topics/i18n/) |
  [Internationalization](/en/2.2/topics/i18n/translation/) |
  [Localization](/en/2.2/topics/i18n/translation/#how-to-create-language-files) |
  [Localized Web UI formatting and form input](/en/2.2/topics/i18n/formatting/)
- [Time zones](/en/2.2/topics/i18n/timezones/)

## 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.

- [Performance and optimization overview](/en/2.2/topics/performance/)

## Geographic framework

[GeoDjango](/en/2.2/ref/contrib/gis/) 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:

- **Authentication:**
  [Overview](/en/2.2/topics/auth/) |
  [Using the authentication system](/en/2.2/topics/auth/default/) |
  [Password management](/en/2.2/topics/auth/passwords/) |
  [Customizing authentication](/en/2.2/topics/auth/customizing/) |
  [API Reference](/en/2.2/ref/contrib/auth/)
- [Caching](/en/2.2/topics/cache/)
- [Logging](/en/2.2/topics/logging/)
- [Sending emails](/en/2.2/topics/email/)
- [Syndication feeds (RSS/Atom)](/en/2.2/ref/contrib/syndication/)
- [Pagination](/en/2.2/topics/pagination/)
- [Messages framework](/en/2.2/ref/contrib/messages/)
- [Serialization](/en/2.2/topics/serialization/)
- [Sessions](/en/2.2/topics/http/sessions/)
- [Sitemaps](/en/2.2/ref/contrib/sitemaps/)
- [Static files management](/en/2.2/ref/contrib/staticfiles/)
- [Data validation](/en/2.2/ref/validators/)

## Other core functionalities

Learn about some other core functionalities of the Django framework:

- [Conditional content processing](/en/2.2/topics/conditional-view-processing/)
- [Content types and generic relations](/en/2.2/ref/contrib/contenttypes/)
- [Flatpages](/en/2.2/ref/contrib/flatpages/)
- [Redirects](/en/2.2/ref/contrib/redirects/)
- [Signals](/en/2.2/topics/signals/)
- [System check framework](/en/2.2/topics/checks/)
- [The sites framework](/en/2.2/ref/contrib/sites/)
- [Unicode in Django](/en/2.2/ref/unicode/)

## The Django open-source project

Learn about the development process for the Django project itself and about how
you can contribute:

- **Community:**
  [How to get involved](/en/2.2/internals/contributing/) |
  [The release process](/en/2.2/internals/release-process/) |
  [Team organization](/en/2.2/internals/organization/) |
  [The Django source code repository](/en/2.2/internals/git/) |
  [Security policies](/en/2.2/internals/security/) |
  [Mailing lists](/en/2.2/internals/mailing-lists/)
- **Design philosophies:**
  [Overview](/en/2.2/misc/design-philosophies/)
- **Documentation:**
  [About this documentation](/en/2.2/internals/contributing/writing-documentation/)
- **Third-party distributions:**
  [Overview](/en/2.2/misc/distributions/)
- **Django over time:**
  [API stability](/en/2.2/misc/api-stability/) |
  [Release notes and upgrading instructions](/en/2.2/releases/) |
  [Deprecation Timeline](/en/2.2/internals/deprecation/)
