--- a/src/cm/views/texts.py Fri Jan 11 16:51:16 2013 +0100
+++ b/src/cm/views/texts.py Mon Jan 14 10:43:21 2013 +0100
@@ -256,11 +256,13 @@
template_dict['json_filter_datas'] = jsonize(filter_datas, request)
from cm.models import ApplicationConfiguration
custom_css_str = ApplicationConfiguration.get_key('custom_css')
- custom_css = cssutils.parseString(custom_css_str)
- for css_rule in custom_css:
- if css_rule.type == css_rule.STYLE_RULE and css_rule.wellformed:
- css_rule.selectorText = "#textcontainer %s" %css_rule.selectorText
- template_dict['custom_css'] = custom_css.cssText
+ if custom_css_str:
+ custom_css = cssutils.parseString(custom_css_str)
+ for css_rule in custom_css:
+ if css_rule.type == css_rule.STYLE_RULE and css_rule.wellformed:
+ css_rule.selectorText = "#textcontainer %s" %css_rule.selectorText
+ template_dict['custom_css'] = custom_css.cssText
+
template_dict['custom_font'] = ApplicationConfiguration.get_key('custom_font')
template_dict['custom_titles_font'] = ApplicationConfiguration.get_key('custom_titles_font')
return render_to_response('site/text_view_comments.html',