mirror of
https://github.com/django/django.git
synced 2025-07-06 10:49:17 +00:00
feat: apply changes from review suggestions
Co-authored-by: Paolo Melchiorre <paolo@melchiorre.org> Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
This commit is contained in:
parent
03c45aa696
commit
c7f0d1f0bc
@ -974,7 +974,7 @@ def phone2numeric_filter(value):
|
|||||||
|
|
||||||
|
|
||||||
@register.filter(is_safe=True)
|
@register.filter(is_safe=True)
|
||||||
def pprint(v):
|
def pprint(value):
|
||||||
repr_instance = DjangoRepr()
|
repr_instance = DjangoRepr()
|
||||||
repr_instance.config(limit=EXCEPTION_PRINT_LIMIT)
|
repr_instance.config(limit=EXCEPTION_PRINT_LIMIT)
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import reprlib
|
|||||||
class DjangoRepr(reprlib.Repr):
|
class DjangoRepr(reprlib.Repr):
|
||||||
|
|
||||||
def config(self, limit):
|
def config(self, limit):
|
||||||
"""Sets maximum print length for all data structures using the given value"""
|
"""Set maximum print length for all data structures to `limit`."""
|
||||||
self.limit = limit
|
self.limit = limit
|
||||||
for attr in dir(self):
|
for attr in dir(self):
|
||||||
if attr.startswith("max") and attr != "maxlevel":
|
if attr.startswith("max") and attr != "maxlevel":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user