Django Documentation 1.9.x
Python Software Foundation
Computers & Technology
Django Documentation 1.9.x
Free
Description
Contents
Reviews

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

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 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” below.

  • Topic guides 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.

  • How-to guides 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.

Unglue.it has taken the epub version of the documentation and fixed over 2000 broken links to make handy and functional mobile versions.

Language
English
ISBN
Unknown
Django documentation contents
Getting started
Getting started
Django at a glance
Design your model
Install it
Enjoy the free API
Django at a glance
A dynamic admin interface: it's not just scaffolding – it's the whole house
Design your URLs
Write your views
Design your templates
This is just the surface
Quick install guide
Install Python
Set up a database
Remove any old versions of Django
Install Django
Verifying
Quick install guide
That's it!
Writing your first Django app, part 1
Creating a project
The development server
Creating the Polls app
Write your first view
Writing your first Django app, part 1
Writing your first Django app, part 2
Database setup
Creating models
Activating models
Playing with the API
Introducing the Django Admin
Writing your first Django app, part 2
Writing your first Django app, part 3
Overview
Writing more views
Write views that actually do something
Raising a 404 error
Use the template system
Removing hardcoded URLs in templates
Namespacing URL names
Writing your first Django app, part 3
Writing your first Django app, part 4
Write a simple form
Use generic views: Less code is better
Writing your first Django app, part 4
Writing your first Django app, part 5
Introducing automated testing
Basic testing strategies
Writing our first test
Test a view
When testing, more is better
Further testing
What's next?
Writing your first Django app, part 5
Writing your first Django app, part 6
Customize your app's look and feel
Adding a background-image
Writing your first Django app, part 6
Writing your first Django app, part 7
Customize the admin form
Adding related objects
Customize the admin change list
Customize the admin look and feel
Customize the admin index page
What's next?
Writing your first Django app, part 7
Advanced tutorial: How to write reusable apps
Reusability matters
Your project and your reusable app
Installing some prerequisites
Packaging your app
Using your own package
Publishing your app
Installing Python packages with virtualenv
Advanced tutorial: How to write reusable apps
What to read next
Finding documentation
How the documentation is organized
How documentation is updated
Where to get it
Differences between versions
What to read next
Writing your first patch for Django
Introduction
Code of Conduct
Installing Git
Getting a copy of Django's development version
Rolling back to a previous revision of Django
Running Django's test suite for the first time
Writing some tests for your ticket
Writing the code for your ticket
Running Django's test suite for the second time
Writing Documentation
Generating a patch for your changes
So what do I do next?
Writing your first patch for Django
Using Django
Using Django
How to install Django
Install Python
Install Apache and mod_wsgi
Get your database running
Remove any old versions of Django
Install the Django code
How to install Django
Models and databases
Models and databases
Models
Making queries
Aggregation
Managers
Performing raw SQL queries
Database transactions
Multiple databases
Tablespaces
Database access optimization
Examples of model relationship API usage
Handling HTTP requests
Handling HTTP requests
URL dispatcher
Writing views
View decorators
File Uploads
Django shortcut functions
Generic views
Middleware
How to use sessions
Working with forms
HTML forms
Django's role in forms
Forms in Django
Building a form
More about Django Form classes
Working with form templates
Further topics
Working with forms
Templates
Support for template engines
The Django template language
Templates
Class-based views
Basic examples
Simple usage in your URLconf
Subclassing generic views
Class-based views
Introduction to class-based views
Built-in class-based generic views
Form handling with class-based views
Using mixins with class-based views
Migrations
The Commands
Backend Support
Workflow
Dependencies
Migration files
Adding migrations to apps
Historical models
Considerations when removing model fields
Data Migrations
Squashing migrations
Serializing values
Supporting Python 2 and 3
Supporting multiple Django versions
Migrations
Managing files
Using files in models
The File object
File storage
Managing files
Testing in Django
Testing in Django
Writing and running tests
Testing tools
Advanced testing topics
User authentication in Django
Overview
Installation
Usage
User authentication in Django
Django's cache framework
Setting up the cache
The per-site cache
The per-view cache
Template fragment caching
The low-level cache API
Downstream caches
Using Vary headers
Controlling cache: Using other headers
Order of MIDDLEWARE_CLASSES
Django's cache framework
Conditional View Processing
The condition decorator
Shortcuts for only computing one value
Using the decorators with other HTTP methods
Comparison with middleware conditional processing
Conditional View Processing
Cryptographic signing
Protecting the SECRET_KEY
Using the low-level API
Cryptographic signing
Sending email
Quick example
send_mail()
send_mass_mail()
mail_admins()
mail_managers()
Examples
Preventing header injection
The EmailMessage class
Email backends
Configuring email for development
Sending email
Internationalization and localization
Overview
Definitions
Internationalization and localization
Logging
A quick logging primer
Using logging
Configuring logging
Django's logging extensions
Django's default logging configuration
Logging
Pagination
Example
Using Paginator in a view
Paginator objects
InvalidPage exceptions
Page objects
Pagination
Porting to Python 3
Philosophy
Porting tips
Coding guidelines
Porting to Python 3
Security in Django
Cross site scripting (XSS) protection
Cross site request forgery (CSRF) protection
SQL injection protection
Clickjacking protection
SSL/HTTPS
Host header validation
Session security
User-uploaded content
Additional security topics
Security in Django
Performance and optimization
Introduction
General approaches
Caching
Understanding laziness
Databases
HTTP performance
Template performance
Using different versions of available software
Performance and optimization
Serializing Django objects
Serializing data
Deserializing data
Serialization formats
Natural keys
Serializing Django objects
Django settings
The basics
Designating the settings
Default settings
Using settings in Python code
Altering settings at runtime
Security
Available settings
Creating your own settings
Using settings without setting DJANGO_SETTINGS_MODULE
Django settings
Signals
Listening to signals
Defining and sending signals
Disconnecting signals
Signals
System check framework
Writing your own checks
System check framework
External packages
Localflavor
Comments
Formtools
External packages
“How-to” guides
“How-to” guides
Authentication using REMOTE_USER
Configuration
Using REMOTE_USER on login pages only
Authentication using REMOTE_USER
Writing custom django-admin commands
Accepting optional arguments
Management commands and locales
Testing
Command objects
Writing custom django-admin commands
Writing custom model fields
Introduction
Background theory
Writing a field subclass
Writing a FileField subclass
Writing custom model fields
Custom Lookups
A simple lookup example
A simple transformer example
Writing an efficient abs__lt lookup
A bilateral transformer example
Writing alternative implementations for existing lookups
How Django determines the lookups and transforms which are used
Custom Lookups
Custom template tags and filters
Code layout
Writing custom template filters
Writing custom template tags
Custom template tags and filters
Writing a custom storage system
Deploying Django
Deploying Django
How to deploy with WSGI
Deployment checklist
Upgrading Django to a newer version
Required Reading
Dependencies
Resolving deprecation warnings
Installation
Testing
Deployment
Upgrading Django to a newer version
Error reporting
Email reports
Filtering error reports
Error reporting
Providing initial data for models
Providing initial data with fixtures
Providing initial data for models
Running Django on Jython
Installing Jython
Creating a servlet container
Installing Django
Installing Jython platform support libraries
Differences with Django on Jython
Running Django on Jython
Integrating Django with a legacy database
Give Django your database parameters
Auto-generate the models
Install the core Django tables
Test and tweak
Integrating Django with a legacy database
Outputting CSV with Django
Using the Python CSV library
Using the template system
Other text-based formats
Outputting CSV with Django
Outputting PDFs with Django
Install ReportLab
Write your view
Complex PDFs
Further resources
Other formats
Outputting PDFs with Django
Managing static files (e.g. images, JavaScript, CSS)
Configuring static files
Serving static files during development
Serving files uploaded by a user during development
Testing
Deployment
Learn more
Managing static files (e.g. images, JavaScript, CSS)
Deploying static files
Serving static files in production
Learn more
Deploying static files
How to install Django on Windows
Install Python
About pip
Install virtualenv and virtualenvwrapper
Install Django
Common pitfalls
How to install Django on Windows
Writing database migrations
Data migrations and multiple databases
Migrations that add unique fields
Controlling the order of migrations
Migrating data between third-party apps
Writing database migrations
Django FAQ
Django FAQ
FAQ: General
Why does this project exist?
What does “Django” mean, and how do you pronounce it?
Is Django stable?
Does Django scale?
Who's behind this?
Which sites use Django?
Django appears to be a MVC framework, but you call the Controller the “view”, and the View the “template”. How come you don't use the standard names?
<Framework X> does <feature Y> – why doesn't Django?
Why did you write all of Django from scratch, instead of using other Python libraries?
Is Django a content-management-system (CMS)?
How can I download the Django documentation to read it offline?
Where can I find Django developers for hire?
How do I cite Django?
FAQ: General
FAQ: Installation
How do I get started?
What are Django's prerequisites?
What Python version can I use with Django?
What Python version should I use with Django?
Should I use the stable version or development version?
FAQ: Installation
FAQ: Using Django
Why do I get an error about importing DJANGO_SETTINGS_MODULE?
I can't stand your template language. Do I have to use it?
Do I have to use your model/database layer?
How do I use image and file fields?
How do I make a variable available to all my templates?
FAQ: Using Django
FAQ: Getting Help
How do I do X? Why doesn't Y work? Where can I go to get help?
Why hasn't my message appeared on django-users?
Nobody on django-users answered my question! What should I do?
I think I've found a bug! What should I do?
I think I've found a security problem! What should I do?
FAQ: Getting Help
FAQ: Databases and models
How can I see the raw SQL queries Django is running?
Can I use Django with a pre-existing database?
If I make changes to a model, how do I update the database?
Do Django models support multiple-column primary keys?
Does Django support NoSQL databases?
How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type?
FAQ: Databases and models
FAQ: The admin
I can't log in. When I enter a valid username and password, it just brings up the login page again, with no error messages.
I can't log in. When I enter a valid username and password, it brings up the login page again, with a “Please enter a correct username and password” error.
How do I automatically set a field's value to the user who last edited the object in the admin?
How do I limit admin access so that objects can only be edited by the users who created them?
My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_wsgi.
My “list_filter” contains a ManyToManyField, but the filter doesn't display.
Some objects aren't appearing in the admin.
How can I customize the functionality of the admin interface?
The dynamically-generated admin site is ugly! How can I change it?
What browsers are supported for using the admin?
FAQ: The admin
FAQ: Contributing code
How can I get started contributing code to Django?
I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
When and how might I remind the core team of a patch I care about?
But I've reminded you several times and you keep ignoring my patch!
FAQ: Contributing code
Troubleshooting
Problems running django-admin
Miscellaneous
Troubleshooting
API Reference
Running management commands from your code
Running management commands from your code
Output redirection
API Reference
Applications
Projects and applications
Configuring applications
Application configuration
Application registry
Initialization process
Applications
System check framework
API Reference
Builtin checks
System check framework
Built-in class-based views API
Specification
Base vs Generic views
Built-in class-based views API
Base views
Generic display views
Generic editing views
Generic date views
Class-based views mixins
Class-based generic views - flattened index
Clickjacking Protection
An example of clickjacking
Preventing clickjacking
How to use it
Limitations
Clickjacking Protection
contrib packages
admin
auth
contenttypes
flatpages
gis
humanize
messages
postgres
redirects
sessions
sites
sitemaps
syndication
webdesign
Other add-ons
contrib packages
The Django admin site
django.contrib.auth
The contenttypes framework
The flatpages app
GeoDjango
django.contrib.humanize
The messages framework
django.contrib.postgres
The redirects app
The sitemap framework
The “sites” framework
The staticfiles app
The syndication feed framework
django.contrib.webdesign
Cross Site Request Forgery protection
How to use it
Rejected requests
How it works
Caching
Testing
Limitations
Edge cases
Contrib and reusable apps
Settings
Frequently Asked Questions
Cross Site Request Forgery protection
Databases
General notes
PostgreSQL notes
MySQL notes
SQLite notes
Oracle notes
Using a 3rd-party database backend
Databases
django-admin and manage.py
Usage
Available commands
Commands provided by applications
Default options
Extra niceties
django-admin and manage.py
Django Exceptions
Django Core Exceptions
URL Resolver exceptions
Database Exceptions
Http Exceptions
Transaction Exceptions
Testing Framework Exceptions
Python Exceptions
Django Exceptions
File handling
File handling
The File object
File storage API
Uploaded Files and Upload Handlers
Forms
Forms
The Forms API
Form fields
Model Form Functions
Formset Functions
Widgets
Form and field validation
Middleware
Available middleware
Middleware ordering
Middleware
Migration Operations
Schema Operations
Special Operations
Writing your own
Migration Operations
Models
Field attribute reference
Models
Model field reference
Model _meta API
Related objects reference
Model class reference
Model Meta options
Model instance reference
QuerySet API reference
Lookup API reference
Query Expressions
Conditional Expressions
Database Functions
Request and response objects
Quick overview
HttpRequest objects
QueryDict objects
HttpResponse objects
JsonResponse objects
StreamingHttpResponse objects
FileResponse objects
Request and response objects
SchemaEditor
Methods
Attributes
SchemaEditor
Settings
Core Settings
Auth
Messages
Sessions
Sites
Static Files
Core Settings Topical Index
Settings
Signals
Model signals
Management signals
Request/response signals
Test signals
Database Wrappers
Signals
Templates
Templates
The Django template language
Built-in template tags and filters
The Django template language: for Python programmers
Upgrading templates to Django 1.8
TemplateResponse and SimpleTemplateResponse
SimpleTemplateResponse objects
TemplateResponse objects
The rendering process
Using TemplateResponse and SimpleTemplateResponse
TemplateResponse and SimpleTemplateResponse
Unicode data
Creating the database
General string handling
Models
The database API
Templates
Files
Email
Form submission
Unicode data
django.core.urlresolvers utility functions
reverse()
reverse_lazy()
resolve()
get_script_prefix()
django.core.urlresolvers utility functions
django.conf.urls utility functions
patterns()
static()
url()
include()
handler400
handler403
handler404
handler500
django.conf.urls utility functions
Django Utils
django.utils.cache
django.utils.dateparse
django.utils.decorators
django.utils.encoding
django.utils.feedgenerator
django.utils.functional
django.utils.html
django.utils.http
django.utils.module_loading
django.utils.safestring
django.utils.text
django.utils.timezone
django.utils.translation
Django Utils
Validators
Writing validators
How validators are run
Built-in validators
Validators
Built-in Views
Serving files in development
Error views
Built-in Views
Meta-documentation and miscellany
Meta-documentation and miscellany
API stability
What “stable” means
Stable APIs
Exceptions
API stability
Design philosophies
Overall
Models
Database API
URL design
Template system
Views
Cache Framework
Design philosophies
Third-party distributions of Django
For distributors
Third-party distributions of Django
Glossary
Release notes
Final releases
Final releases
1.9 release
1.8 release
1.7 release
1.6 release
1.5 release
1.4 release
1.3 release
1.2 release
1.1 release
1.0 release
Pre-1.0 releases
Security releases
Release notes
Django internals
Django internals
Contributing to Django
Contributing to Django
Advice for new contributors
Reporting bugs and requesting features
Triaging tickets
Writing code
Writing documentation
Localizing Django
Committing code
Mailing lists
django-users
django-core-mentorship
django-developers
django-i18n
django-announce
django-updates
Mailing lists
Organization of the Django Project
Principles
Core team
Technical board
Changing the organization
Organization of the Django Project
Django team
The original team
The current team
Past team members
Django team
Roles
Technical board
Committers
Security team
Releasers
Ops team
Roles
Django's security policies
Reporting security issues
Supported versions
How Django discloses security issues
Who receives advance notification
Requesting notifications
Django's security policies
Django's release process
Official releases
Release cadence
Deprecation policy
Supported versions
Release process
Django's release process
Django Deprecation Timeline
2.0
1.10
1.9
1.8
1.7
1.6
1.5
1.4
1.3
Django Deprecation Timeline
The Django source code repository
High-level overview
The master branch
Other branches
Tags
The Django source code repository
How is Django Formed?
Overview
Prerequisites
Pre-release tasks
Preparing for release
Actually rolling the release
Making the release(s) available to the public
Post-release
New stable branch tasks
Notes on setting the VERSION tuple
How is Django Formed?
The book hasn't received reviews yet.