Package: django-tables / 0.15.0-3

dont_call_managers.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: django-tables/django_tables2/utils.py
===================================================================
--- django-tables.orig/django_tables2/utils.py	2014-02-02 20:07:17.000000000 +1100
+++ django-tables/django_tables2/utils.py	2014-10-17 09:54:00.073175687 +1100
@@ -377,7 +377,8 @@
                     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.