[Python-modules-commits] [django-tables] 04/07: dont_call_managers

Brian May bam at moszumanska.debian.org
Thu Oct 22 03:33:57 UTC 2015


This is an automated email from the git hooks/post-receive script.

bam pushed a commit to branch master
in repository django-tables.

commit 33215fb37597ebc4b039b46822d6554d1f084395
Author: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
Date:   Thu Oct 8 08:57:47 2015 -0700

    dont_call_managers
    
    Patch-Name: dont_call_managers.patch
---
 django_tables2/utils.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/django_tables2/utils.py b/django_tables2/utils.py
index 078c7fd..b4ca445 100644
--- a/django_tables2/utils.py
+++ b/django_tables2/utils.py
@@ -377,7 +377,8 @@ class Accessor(str):
                     if safe and getattr(current, 'alters_data', False):
                         raise ValueError('refusing to call %s() because `.alters_data = True`'
                                          % repr(current))
-                    current = current()
+                    if not getattr(current, 'do_not_call_in_templates', False):
+                        current = current()
                 # important that we break in None case, or a relationship
                 # spanning across a null-key will raise an exception in the
                 # next iteration, instead of defaulting.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-tables.git



More information about the Python-modules-commits mailing list