kobotoolbox/dkobo — pull request #504 by jnm (2014-12-04 03:14:42+00:00)
Title: Add django_digest to INSTALLED_APPS to generate password digests for API authentication

Without having the `django_digest` app in the project that handles authentication (this project!), the `django_digest_partialdigest` table doesn't get populated. These overrides from [django-digest's models.py](https://bitbucket.org/akoha/django-digest/src/fe72787e860ed42c8ff3ee8edd17b24225fa06f5/django_digest/models.py?at=default#cl-113) have to be in place:

User.check_password = _new_check_password
User.set_password = _new_set_password
ModelBackend.authenticate = _new_authenticate

Otherwise, [`onadata.libs.authentication.DigestAuthentication.authenticate()`](https://github.com/kobotoolbox/kobocat/blob/master/onadata/libs/authentication.py#L18) fails due to "no partial digest available for user"--a message that can only be seen if django-digest logging is set to DEBUG.