diff --git a/www/conservancy/apps/blog/views.py b/www/conservancy/apps/blog/views.py index 77b9eb30d1691d18e8135d57028db3f2ca958c8a..4c7f9db941272e5586cd0ce8fdbb2f02bbbec1a2 100644 --- a/www/conservancy/apps/blog/views.py +++ b/www/conservancy/apps/blog/views.py @@ -96,7 +96,7 @@ def query(request): query_string = d.urlencode() - return relative_redirect(request, '%s%s%s' % (base_url, '?' if query_string else '', query_string)) + return relative_redirect(request, '{}{}{}'.format(base_url, '?' if query_string else '', query_string)) else: authors = sorted(Person.objects.filter(currently_employed=True, @@ -113,7 +113,7 @@ def relative_redirect(request, path): if settings.FORCE_CANONICAL_HOSTNAME: host = settings.FORCE_CANONICAL_HOSTNAME - url = "%s://%s%s" % (request.is_secure() and 'https' or 'http', host, path) + url = "{}://{}{}".format(request.is_secure() and 'https' or 'http', host, path) return http.HttpResponseRedirect(url) class BlogYearArchiveView(YearArchiveView): @@ -122,7 +122,7 @@ class BlogYearArchiveView(YearArchiveView): extra_context = {} def get_context_data(self, **kwargs): - context = super(BlogYearArchiveView, self).get_context_data(**kwargs) + context = super().get_context_data(**kwargs) context.update(self.extra_context) return context @@ -131,7 +131,7 @@ class BlogMonthArchiveView(MonthArchiveView): extra_context = {} def get_context_data(self, **kwargs): - context = super(BlogMonthArchiveView, self).get_context_data(**kwargs) + context = super().get_context_data(**kwargs) context.update(self.extra_context) return context @@ -140,7 +140,7 @@ class BlogDayArchiveView(DayArchiveView): extra_context = {} def get_context_data(self, **kwargs): - context = super(BlogDayArchiveView, self).get_context_data(**kwargs) + context = super().get_context_data(**kwargs) context.update(self.extra_context) return context @@ -149,6 +149,6 @@ class BlogDateDetailView(DateDetailView): extra_context = {} def get_context_data(self, **kwargs): - context = super(BlogDateDetailView, self).get_context_data(**kwargs) + context = super().get_context_data(**kwargs) context.update(self.extra_context) return context