Coursys Code Standards

From SFU_Public
Jump to: navigation, search


These are expected of all code in the system:

  • All actions that modify the database should be logged with a new `log.models.LogEntry` object.
  • All views should have an appropriate permissions decorator (like `@requires_course_staff_by_slug`). If not, then be very careful when checking permission in the code.
  • Where possible, create unit tests in `app/`. Check that the unit tests pass before committing changes.
  • Have a look at the Style Guide for Python and try to follow it as much as possible.