mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Merge pull request #69 from amrhassan/master
Replaced u string literal prefixes with six.u() calls
This commit is contained in:
commit
5cc1dd2215
2 changed files with 5 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ from axes.models import AccessLog
|
|||
from axes.models import AccessAttempt
|
||||
from axes.signals import user_locked_out
|
||||
import axes
|
||||
from django.utils import six
|
||||
|
||||
|
||||
# see if the user has overridden the failure limit
|
||||
|
|
@ -85,7 +86,7 @@ def query2str(items):
|
|||
kvs = []
|
||||
for k, v in items:
|
||||
if k != 'password':
|
||||
kvs.append(u'%s=%s' % (k, v))
|
||||
kvs.append(six.u('%s=%s') % (k, v))
|
||||
|
||||
return '\n'.join(kvs)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from django.db import models
|
||||
|
||||
from django.utils import six
|
||||
|
||||
class CommonAccess(models.Model):
|
||||
user_agent = models.CharField(
|
||||
|
|
@ -59,7 +59,7 @@ class AccessAttempt(CommonAccess):
|
|||
return self.failures_since_start
|
||||
|
||||
def __unicode__(self):
|
||||
return u'Attempted Access: %s' % self.attempt_time
|
||||
return six.u('Attempted Access: %s') % self.attempt_time
|
||||
|
||||
|
||||
class AccessLog(CommonAccess):
|
||||
|
|
@ -69,4 +69,4 @@ class AccessLog(CommonAccess):
|
|||
)
|
||||
|
||||
def __unicode__(self):
|
||||
return u'Access Log for %s @ %s' % (self.username, self.attempt_time)
|
||||
return six.u('Access Log for %s @ %s') % (self.username, self.attempt_time)
|
||||
|
|
|
|||
Loading…
Reference in a new issue