lint: Fix warnings under confirmation/.

This commit is contained in:
Tim Abbott 2016-06-20 08:19:54 -07:00
parent a9a6687b7d
commit eb71173be3
4 changed files with 3 additions and 4 deletions

View File

@ -110,4 +110,4 @@ class Confirmation(models.Model):
verbose_name_plural = _('confirmation emails') verbose_name_plural = _('confirmation emails')
def __unicode__(self): def __unicode__(self):
return _('confirmation email for %s') % self.content_object return _('confirmation email for %s') % (self.content_object,)

View File

@ -9,4 +9,4 @@ from django.conf import settings
def get_status_field(app_label, model_name): def get_status_field(app_label, model_name):
model = '%s.%s' % (app_label, model_name) model = '%s.%s' % (app_label, model_name)
mapping = getattr(settings, 'STATUS_FIELDS', {}) mapping = getattr(settings, 'STATUS_FIELDS', {})
return mapping.get(model, 'status') return mapping.get(model, 'status')

View File

@ -41,5 +41,5 @@ def confirm(request, confirmation_key):
] ]
if obj: if obj:
# if we have an object, we can use specific template # if we have an object, we can use specific template
templates.insert(0, 'confirmation/confirm_%s.html' % obj._meta.model_name) templates.insert(0, 'confirmation/confirm_%s.html' % (obj._meta.model_name,))
return render_to_response(templates, ctx, request=request) return render_to_response(templates, ctx, request=request)

View File

@ -34,7 +34,6 @@ os.chdir(os.path.join(os.path.dirname(__file__), '..'))
exclude = """ exclude = """
static/third static/third
confirmation
frontend_tests/casperjs frontend_tests/casperjs
zerver/migrations zerver/migrations
node_modules node_modules