mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #17358 -- Updated logging calls to use official syntax for arguments instead of string interpolation. Thanks, spulec.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17480 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -68,7 +68,7 @@ class View(object):
|
||||
|
||||
def http_method_not_allowed(self, request, *args, **kwargs):
|
||||
allowed_methods = [m for m in self.http_method_names if hasattr(self, m)]
|
||||
logger.warning('Method Not Allowed (%s): %s' % (request.method, request.path),
|
||||
logger.warning('Method Not Allowed (%s): %s', request.method, request.path,
|
||||
extra={
|
||||
'status_code': 405,
|
||||
'request': self.request
|
||||
@@ -157,7 +157,7 @@ class RedirectView(View):
|
||||
else:
|
||||
return http.HttpResponseRedirect(url)
|
||||
else:
|
||||
logger.warning('Gone: %s' % self.request.path,
|
||||
logger.warning('Gone: %s', self.request.path,
|
||||
extra={
|
||||
'status_code': 410,
|
||||
'request': self.request
|
||||
|
||||
Reference in New Issue
Block a user