Loading django/contrib/admin/options.py +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ from django.utils.encoding import force_text HORIZONTAL, VERTICAL = 1, 2 # returns the <ul> class for a given radio_admin field get_ul_class = lambda x: 'radiolist%s' % ((x == HORIZONTAL) and ' inline' or '') get_ul_class = lambda x: 'radiolist%s' % (' inline' if x == HORIZONTAL else '') class IncorrectLookupParameters(Exception): Loading Loading @@ -189,7 +189,7 @@ class BaseModelAdmin(six.with_metaclass(RenameBaseModelAdminMethods)): kwargs['widget'] = widgets.AdminRadioSelect(attrs={ 'class': get_ul_class(self.radio_fields[db_field.name]), }) kwargs['empty_label'] = db_field.blank and _('None') or None kwargs['empty_label'] = _('None') if db_field.blank else None queryset = self.get_field_queryset(db, db_field, request) if queryset is not None: Loading django/contrib/comments/views/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ def next_redirect(request, fallback, **get_kwargs): else: anchor = '' joiner = ('?' in next) and '&' or '?' joiner = '&' if '?' in next else '?' next += joiner + urlencode(get_kwargs) + anchor return HttpResponseRedirect(next) Loading django/contrib/contenttypes/views.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ def shortcut(request, content_type_id, object_id): # If all that malarkey found an object domain, use it. Otherwise, fall back # to whatever get_absolute_url() returned. if object_domain is not None: protocol = request.is_secure() and 'https' or 'http' protocol = 'https' if request.is_secure() else 'http' return http.HttpResponseRedirect('%s://%s%s' % (protocol, object_domain, absurl)) else: Loading django/contrib/formtools/tests/wizard/test_forms.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ from django.contrib.formtools.wizard.views import (WizardView, class DummyRequest(http.HttpRequest): def __init__(self, POST=None): super(DummyRequest, self).__init__() self.method = POST and "POST" or "GET" self.method = "POST" if POST else "GET" if POST is not None: self.POST.update(POST) self.session = {} Loading django/contrib/gis/sitemaps/views.py +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ def index(request, sitemaps): """ current_site = get_current_site(request) sites = [] protocol = request.is_secure() and 'https' or 'http' protocol = 'https' if request.is_secure() else 'http' for section, site in sitemaps.items(): if callable(site): pages = site().paginator.num_pages Loading Loading
django/contrib/admin/options.py +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ from django.utils.encoding import force_text HORIZONTAL, VERTICAL = 1, 2 # returns the <ul> class for a given radio_admin field get_ul_class = lambda x: 'radiolist%s' % ((x == HORIZONTAL) and ' inline' or '') get_ul_class = lambda x: 'radiolist%s' % (' inline' if x == HORIZONTAL else '') class IncorrectLookupParameters(Exception): Loading Loading @@ -189,7 +189,7 @@ class BaseModelAdmin(six.with_metaclass(RenameBaseModelAdminMethods)): kwargs['widget'] = widgets.AdminRadioSelect(attrs={ 'class': get_ul_class(self.radio_fields[db_field.name]), }) kwargs['empty_label'] = db_field.blank and _('None') or None kwargs['empty_label'] = _('None') if db_field.blank else None queryset = self.get_field_queryset(db, db_field, request) if queryset is not None: Loading
django/contrib/comments/views/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ def next_redirect(request, fallback, **get_kwargs): else: anchor = '' joiner = ('?' in next) and '&' or '?' joiner = '&' if '?' in next else '?' next += joiner + urlencode(get_kwargs) + anchor return HttpResponseRedirect(next) Loading
django/contrib/contenttypes/views.py +1 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,7 @@ def shortcut(request, content_type_id, object_id): # If all that malarkey found an object domain, use it. Otherwise, fall back # to whatever get_absolute_url() returned. if object_domain is not None: protocol = request.is_secure() and 'https' or 'http' protocol = 'https' if request.is_secure() else 'http' return http.HttpResponseRedirect('%s://%s%s' % (protocol, object_domain, absurl)) else: Loading
django/contrib/formtools/tests/wizard/test_forms.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ from django.contrib.formtools.wizard.views import (WizardView, class DummyRequest(http.HttpRequest): def __init__(self, POST=None): super(DummyRequest, self).__init__() self.method = POST and "POST" or "GET" self.method = "POST" if POST else "GET" if POST is not None: self.POST.update(POST) self.session = {} Loading
django/contrib/gis/sitemaps/views.py +1 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ def index(request, sitemaps): """ current_site = get_current_site(request) sites = [] protocol = request.is_secure() and 'https' or 'http' protocol = 'https' if request.is_secure() else 'http' for section, site in sitemaps.items(): if callable(site): pages = site().paginator.num_pages Loading