Tuesday, May 3, 2011

Three easy rules about parts of code of apps within django project

Very easy convention about parts of code of apps within django project:

  • Any functions which aren't views shouldn't be placed in views.py
  • Any functions related to work with forms should be in forms.py and be method of the form class
  • Any function which used by more than one view/form/function should be saved in utils.py

No comments:

Post a Comment