Django python PEP8 summary

  • Indentation equal to 4 spaces
  • 2 blank lines between classes and functions
  • 1 blank line between attributes and methods inside classes
  • Length 99 chars per line for private projects and 79 chars per line for public projects
  • Order of imports: 1) Django core. 2) Third part. 3) Local apps
  • Don’t use import *

## Another good rules

  • Write a README file
  • Define a .gitignore file
  • Inside project directory: Project (urls, settings, init, wsgi), apps (all your apps), templates, static (js, img, css)
  • Write local, staging and production settings files
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s