Fixes #148. Thanks @dvinegla.

This commit is contained in:
Tom Christie 2012-01-30 14:13:57 +00:00
parent c7a8056034
commit 278b3576f3

View File

@ -188,7 +188,7 @@ class PerUserThrottling(BaseThrottle):
def get_cache_key(self): def get_cache_key(self):
if self.auth.is_authenticated(): if self.auth.is_authenticated():
ident = str(self.auth) ident = unicode(self.auth)
else: else:
ident = self.view.request.META.get('REMOTE_ADDR', None) ident = self.view.request.META.get('REMOTE_ADDR', None)
return 'throttle_user_%s' % ident return 'throttle_user_%s' % ident