djangodocs.org

1305 sections across all versions Narrow to Django 6.0 (current) →

Topic guide

Django’s serialization framework provides a mechanism for “translating” Django models into other formats.

dev

Cryptographic signing

Topic guide

Ensuring data stored in hidden form fields has not been tampered with. Generating one-time secret URLs for allowing temporary access to a protected resource, for example a downloadable file that a user has paid for.

dev

Making requests

Topic guide Testing tools

After you call this method, the test client will have all the cookies and session data required to pass any login-based tests that may form part of a view.

dev

SimpleTestCase

Topic guide Testing tools

… callable raises a certain exception | | assertWarnsMessage() | That a callable triggers a certain warning | | assertFieldOutput() | Form field rendering and error output | | assertContains() | Presence or absence of HTML fragments | | assertTemplateUsed() | …

dev

Isolating apps

Topic guide Testing tools

utils.isolate_apps(*app_labels,attr_name=None,kwarg_name=None) : Registers the models defined within a wrapped context into their own isolated apps registry.

dev

How-to

… can use csrf_protect() on particular views you want to protect (see below). 2. In any template that uses a POST form, use the csrf_token tag inside the <form> element if the form is for an internal URL, e.g.: This should …

4.2 5.0 5.1 5.2 6.0

Committing guidelines

Internals Committing code

… in RSS API.” Incorrect: “Fixes Unicode bug in RSS API.” (present tense) Incorrect: “Fixing Unicode bug in RSS API.” (“-ing” form) Incorrect: “Fixed Unicode bug in RSS API” (missing trailing period) The commit message should be in lines of 72 …

6.0

Communication channels

Internals Contributing to Django

Join it, to become familiar with what we’re doing and how we talk about it. You’ll be able to form relationships with more experienced contributors who are there to help guide you towards success.

5.1 5.2 6.0

Keywords

Internals Triaging tickets Other triage attributes

Keyword search finds the keyword string anywhere in the keywords. For example, clicking on a ticket with the keyword “form” will yield similar tickets tagged with keywords containing strings such as “formset”, “modelformset”, and “ManagementForm”.

4.2 5.0 5.1 5.2 6.0

Documentation lint check

Internals Writing documentation How to start contributing documentationDocumentation quality checks

Django’s documentation is checked for reStructuredText style and formal issues using sphinx-lint. This helps catch problems like stray tabs, trailing whitespace, excessive line length, and similar formatting problems.

6.0

1.5

Internals Django Deprecation Timeline

The undocumented function django.contrib.formtools.utils.security_hash will be removed, instead use django.contrib.formtools.utils.form_hmac The function-based generic view modules will be removed in favor of their class-based equivalents, outlined here. The django.core.servers.basehttp.AdminMediaHandler will be removed. In its place use django.contrib.staticfiles.handlers.StaticFilesHandler.

6.0

Internals Django’s security policies Reporting security issuesReporting guidelines

… sanitized: Developers must always validate and sanitize input before using it. The correct approach would be to use a Django form to ensure email is properly validated: Similarly, as Django’s raw SQL constructs (such as extra(), RawSQL, and keyword arguments …

5.1 5.2 6.0

Overview

Tutorial Writing your first Django app, part 3

Question “detail” page – displays a question text, with no results but with a form to vote. Question “results” page – displays results for a particular question. Vote action – handles voting for a particular choice in a particular question.

4.2 5.0 5.1 5.2 6.0