Version 1 (modified by adrian, 10 years ago) (diff)

Added page

Patch guidelines

We're very grateful for patches to Django's code. A patch is a file, or collection of files, that describes how to change Django's source code or documentation to fix bugs, add features or improve the framework in any other way.

This document gives some brief, but important, guidelines for submitting patches.

Patch style

  • Submit patches in the format returned by the svn diff command. An exception is for code changes that are described more clearly in plain English than in code. Indentation is the most common example; it's hard to read patches when the only difference in code is that it's indented.

Code style

Please follow these Python style guidelines when submitting patches:

  • Use four spaces to indent.
  • Follow the "Whitespace in Expressions and Statements" guidelines of PEP 8.
  • Use underscores, not camelCase, for variable, function and method names.
  • Use InitialCaps for class names.
Back to Top