Django documentation
Are you new to Django or to programming? This is the place to start!
- From scratch: Overview |
- Tutorial: Part 1: Requests and responses | | Part 3: Views and templates | | Part 5: Testing | | Part 7: Customizing the admin site
- Advanced Tutorials: | Writing your first patch for Django
Getting help
Having trouble? We’d like to help!
- Try the FAQ – it’s got answers to many common questions.
- Looking for specific information? Try the , Module Index or the .
- Not found anything? See FAQ: Getting Help for information on getting support and asking questions to the community.
- Report bugs with Django in our .
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:
- 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”.
- discuss key topics and concepts at a fairly high level and provide useful background information and explanation.
- Reference guides 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.
- 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.
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: | Field types | | Meta options |
- Model instances: Instance methods |
- Migrations: Introduction to Migrations | | SchemaEditor |
- Advanced: Managers | | Transactions | | Search | | Multiple databases | | Query Expressions | | Database Functions
- Other: | Legacy databases | | Optimize database access |
The view layer
- The basics: | View functions | | Decorators |
- Reference: Built-in Views | | TemplateResponse objects
- File uploads: | File objects | | Managing files |
- Class-based views: Overview | | Built-in editing views | | API reference |
- Advanced: Generating CSV |
- Middleware: Overview |
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
- For designers: | Built-in tags and filters |
- For programmers: Template API | | Custom template backend
Forms
Django provides a rich framework to facilitate the creation of forms and the manipulation of form data.
- The basics: Overview | | Built-in fields |
- Advanced: Forms for models | | Formsets |
The development process
Learn about the various components and tools to help you in the development and testing of Django applications:
- Settings: | Full list of settings
- Applications:
- Exceptions: Overview
- django-admin and manage.py: | Adding custom commands
- Testing: | Writing and running tests | | Advanced topics
- Deployment: | WSGI servers | | Deploying static files | | Deployment checklist
The admin
Find all you need to know about the automated admin interface, one of Django’s most popular features:
Security
Django offers a robust internationalization and localization framework to assist you in the development of applications for multiple languages and world regions:
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.
Geographic framework
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: | Using the authentication system | | Customizing authentication |
- Caching
- Sending emails
- Pagination
- Serialization
- Sitemaps
- Data validation
Other core functionalities
Learn about the development process for the Django project itself and about how you can contribute:
- Community: How to get involved | | Team organization | | Security policies |
- Design philosophies: Overview
- Documentation:
- Third-party distributions: Overview