From 4962816d43201087610844e4dc188b819e48eaf6 Mon Sep 17 00:00:00 2001 From: Jan Pieter Waagmeester Date: Sat, 19 Oct 2019 09:49:44 +0200 Subject: [PATCH] Add invalid accessor string to error message --- django_tables2/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django_tables2/utils.py b/django_tables2/utils.py index 3a7eeef7..4278569f 100644 --- a/django_tables2/utils.py +++ b/django_tables2/utils.py @@ -288,7 +288,9 @@ class Accessor(str): def __new__(cls, value): if "." in value: - raise ValueError("Use '__' to separate path components, not '.'.") + raise ValueError( + "Use '__' to separate path components, not '.' in accessor '{}'.".format(value) + ) return super().__new__(cls, value) def resolve(self, context, safe=True, quiet=False):