Pep8
Use pk instead of id
Replace StandardError exception by Exception

StandardError is deprecated in python 3.x. Exception should be used instead.