# HG changeset patch # User Sylvain Thénault # Date 1449566684 -3600 # Node ID 4f28cb25b6c168ecbc6644c515aa094bbe2241c2 # Parent daef7ce08fea6c6a0445c57b4632b588da47dd2e [rest] avoid field on two lines if name is above some size limit. Closes #8961835 diff -r daef7ce08fea -r 4f28cb25b6c1 ext/rest.py --- a/ext/rest.py Thu Jul 30 11:11:12 2015 +0200 +++ b/ext/rest.py Tue Dec 08 10:24:44 2015 +0100 @@ -34,6 +34,7 @@ """ __docformat__ = "restructuredtext en" +import sys from cStringIO import StringIO from itertools import chain from logging import getLogger @@ -415,6 +416,8 @@ # (though try/except may be a better option...). May be the # above traceback option will avoid this? 'halt_level': 10, + # disable stupid switch to colspan=2 if field name is above a size limit + 'field_name_limit': sys.maxsize, } if context: if hasattr(req, 'url'): diff -r daef7ce08fea -r 4f28cb25b6c1 ext/test/unittest_rest.py --- a/ext/test/unittest_rest.py Thu Jul 30 11:11:12 2015 +0200 +++ b/ext/test/unittest_rest.py Tue Dec 08 10:24:44 2015 +0100 @@ -58,6 +58,14 @@ ''') + def test_disable_field_name_colspan(self): + with self.admin_access.web_request() as req: + context = self.context(req) + value = rest_publish(context, '''my field list: + +:a long dumb param name: value +''') + self.assertNotIn('colspan', value) def test_rql_role_with_vid(self): with self.admin_access.web_request() as req: