Loading django/contrib/admin/templatetags/log.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ class AdminLogNode(template.Node): user_id = self.user if not user_id.isdigit(): user_id = context[self.user].id context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit] context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:int(self.limit)] return '' @register.tag Loading django/contrib/admin/views/main.py +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ class ChangeList(object): if remove is None: remove = [] p = self.params.copy() for r in remove: for k in p.keys(): for k in list(p.keys()): if k.startswith(r): del p[k] for k, v in new_params.items(): Loading django/db/models/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -855,7 +855,7 @@ class Model(six.with_metaclass(ModelBase, object)): } # unique_together else: field_labels = map(lambda f: capfirst(opts.get_field(f).verbose_name), unique_check) field_labels = [capfirst(opts.get_field(f).verbose_name) for f in unique_check] field_labels = get_text_list(field_labels, _('and')) return _("%(model_name)s with this %(field_label)s already exists.") % { 'model_name': six.text_type(model_name), Loading django/utils/cache.py +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ def patch_cache_control(response, **kwargs): # max-age, use the minimum of the two ages. In practice this happens when # a decorator and a piece of middleware both operate on a given view. if 'max-age' in cc and 'max_age' in kwargs: kwargs['max_age'] = min(cc['max-age'], kwargs['max_age']) kwargs['max_age'] = min(int(cc['max-age']), kwargs['max_age']) # Allow overriding private caching and vice versa if 'private' in cc and 'public' in kwargs: Loading django/utils/text.py +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ ustring_re = re.compile("([\u0080-\uffff])") def javascript_quote(s, quote_double_quotes=False): def fix(match): return b"\u%04x" % ord(match.group(1)) return "\\u%04x" % ord(match.group(1)) if type(s) == bytes: s = s.decode('utf-8') Loading Loading
django/contrib/admin/templatetags/log.py +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ class AdminLogNode(template.Node): user_id = self.user if not user_id.isdigit(): user_id = context[self.user].id context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:self.limit] context[self.varname] = LogEntry.objects.filter(user__id__exact=user_id).select_related('content_type', 'user')[:int(self.limit)] return '' @register.tag Loading
django/contrib/admin/views/main.py +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ class ChangeList(object): if remove is None: remove = [] p = self.params.copy() for r in remove: for k in p.keys(): for k in list(p.keys()): if k.startswith(r): del p[k] for k, v in new_params.items(): Loading
django/db/models/base.py +1 −1 Original line number Diff line number Diff line Loading @@ -855,7 +855,7 @@ class Model(six.with_metaclass(ModelBase, object)): } # unique_together else: field_labels = map(lambda f: capfirst(opts.get_field(f).verbose_name), unique_check) field_labels = [capfirst(opts.get_field(f).verbose_name) for f in unique_check] field_labels = get_text_list(field_labels, _('and')) return _("%(model_name)s with this %(field_label)s already exists.") % { 'model_name': six.text_type(model_name), Loading
django/utils/cache.py +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ def patch_cache_control(response, **kwargs): # max-age, use the minimum of the two ages. In practice this happens when # a decorator and a piece of middleware both operate on a given view. if 'max-age' in cc and 'max_age' in kwargs: kwargs['max_age'] = min(cc['max-age'], kwargs['max_age']) kwargs['max_age'] = min(int(cc['max-age']), kwargs['max_age']) # Allow overriding private caching and vice versa if 'private' in cc and 'public' in kwargs: Loading
django/utils/text.py +1 −1 Original line number Diff line number Diff line Loading @@ -287,7 +287,7 @@ ustring_re = re.compile("([\u0080-\uffff])") def javascript_quote(s, quote_double_quotes=False): def fix(match): return b"\u%04x" % ord(match.group(1)) return "\\u%04x" % ord(match.group(1)) if type(s) == bytes: s = s.decode('utf-8') Loading