jeffknupp/sandman — pull request #75 by mietek (2014-04-24 14:57:46+00:00)
Title: Add missing reponse functions

The `etag` decorator was added in a595665ab75c5995f0cb3af7463215f9cd7aabf7, following Miguel Grinberg's [`decorators` module](https://github.com/miguelgrinberg/api-pycon2014/blob/master/api/decorators.py), but the referenced [`errors` module](https://github.com/miguelgrinberg/api-pycon2014/blob/master/api/errors.py) was forgotten, causing runtime failures:

2014-04-24T14:40:22.225343+00:00 app[web.1]: Traceback (most recent call last):
2014-04-24T14:40:22.225344+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 495, in spawn_worker
2014-04-24T14:40:22.225345+00:00 app[web.1]: worker.init_process()
2014-04-24T14:40:22.225347+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 106, in init_process
2014-04-24T14:40:22.225348+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2014-04-24T14:40:22.225349+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 114, in wsgi
2014-04-24T14:40:22.225351+00:00 app[web.1]: self.callable = self.load()
2014-04-24T14:40:22.225352+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 62, in load
2014-04-24T14:40:22.225355+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 49, in load_wsgiapp
2014-04-24T14:40:22.225353+00:00 app[web.1]: return self.load_wsgiapp()
2014-04-24T14:40:22.225364+00:00 app[web.1]: return util.import_app(self.app_uri)
2014-04-24T14:40:22.225366+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 354, in import_app
2014-04-24T14:40:22.225367+00:00 app[web.1]: __import__(module)
2014-04-24T14:40:22.225368+00:00 app[web.1]: File "/app/sandman-on-heroku.py", line 2, in
2014-04-24T14:40:22.225370+00:00 app[web.1]: from sandman import app
2014-04-24T14:40:22.225371+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/sandman/__init__.py", line 15, in
2014-04-24T14:40:22.225372+00:00 app[web.1]: from . import sandman
2014-04-24T14:40:22.225375+00:00 app[web.1]: from .decorators import etag
2014-04-24T14:40:22.225376+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/sandman/decorators.py", line 4, in
2014-04-24T14:40:22.225378+00:00 app[web.1]: from .errors import precondition_failed, not_modified
2014-04-24T14:40:22.225379+00:00 app[web.1]: ImportError: No module named errors

The reference to `errors` was removed in 0ada6f19b416793661f102909808dd7b455d2b04, without fixing the problem.

This adds the missing response functions.