From 9454ccc5b819db2622ef7181dc5cd08832f39a79 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 9 May 2012 14:35:00 +0530 Subject: [PATCH] cms fixes --- erpnext/website/doctype/style_settings/custom_template.css | 2 +- erpnext/website/doctype/style_settings/style_settings.py | 3 +++ erpnext/website/doctype/website_settings/website_settings.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/website/doctype/style_settings/custom_template.css b/erpnext/website/doctype/style_settings/custom_template.css index 6fe8ce5872..0398325818 100644 --- a/erpnext/website/doctype/style_settings/custom_template.css +++ b/erpnext/website/doctype/style_settings/custom_template.css @@ -1,6 +1,6 @@ #body_div { {% if doc.background_image %} - background: url("files/{{ doc.background_image }}") repeat; + background: url("../files/{{ doc.background_image }}") repeat; {% elif doc.background_color %} background-color: #{{ doc.background_color }}; background-image: none; diff --git a/erpnext/website/doctype/style_settings/style_settings.py b/erpnext/website/doctype/style_settings/style_settings.py index f47a427bae..69e230b779 100644 --- a/erpnext/website/doctype/style_settings/style_settings.py +++ b/erpnext/website/doctype/style_settings/style_settings.py @@ -33,6 +33,9 @@ class DocType: self.doc.custom_css = temp.render(doc = self.doc) if self.doc.add_css: self.doc.custom_css += '\n\n/* User CSS */\n\n' + self.doc.add_css + + from webnotes.cms.make import make_web_core + make_web_core() from webnotes.session_cache import clear_cache clear_cache('Guest') diff --git a/erpnext/website/doctype/website_settings/website_settings.py b/erpnext/website/doctype/website_settings/website_settings.py index 9693615ea4..6f0c4da51b 100644 --- a/erpnext/website/doctype/website_settings/website_settings.py +++ b/erpnext/website/doctype/website_settings/website_settings.py @@ -50,6 +50,7 @@ class DocType: make_web_core() get_obj('Page', 'blog').write_cms_page(force=True) + get_obj('Page', 'Login Page').write_cms_page(force=True) webnotes.msgprint('Rebuilt all blogs and pages')