-
Notifications
You must be signed in to change notification settings - Fork 0
coding standards
Alexandru Marcu edited this page May 30, 2015
·
4 revisions
Django Models:
- Foreign keys appear at the top of models
- single quote ' is preferred to double " which should only be used for block comments
- Models of a single app should stay in one file
- Models should not contain business logic (use services for this)
- Explicitly declare the function or class you import (not xx.Foo, but from xx import Foo)
- Always use absolute paths for imports
- Class properties should only be declared in class constructor, unless static properties or constants
PEP-8 with the following exceptions:
- Max line length is 100