class rendering issue with django 1.4
We recently upgraded to django 1.4 and started getting an issue with the way classes are rendered for fieldsets. For example, a fieldset setting of 'classes': ['advanced', 'collapse'] produces:
<fieldset id="Additional Options" class="a d v a n c e d c o l l a p s e">
The issue appears to be in _gather_fieldsets line 79 where the classes option is joined into a string. Then when rendering, the node is treated as if it is a list of classes rather than a string, producing class names with each letter separated by a space.
I was able to fix the issue by removing the ' '.join() and appending the classes as the original list of strings. I've pasted the code change below. With this change, fieldset classes are working again as they were before the 1.4 upgrade.
self._cached_fieldsets.append(BP_Fieldset(self.form, name, boundfields, options.get('legend', None), options.get('classes', ()), options.get('description', '')))