From af1f437fad98ae627be05542c2c0cb27df7ab92f Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 12 Jul 2012 22:06:27 +0530 Subject: [PATCH] update in cms2 patch: delete html files --- erpnext/patches/june_2012/cms2.py | 10 ++++++++++ install_erpnext.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/june_2012/cms2.py b/erpnext/patches/june_2012/cms2.py index fee7b0199d..03a60ed6ea 100644 --- a/erpnext/patches/june_2012/cms2.py +++ b/erpnext/patches/june_2012/cms2.py @@ -42,6 +42,16 @@ def cleanup(): webnotes.model.delete_doc('Page', 'blog') webnotes.model.delete_doc('Page', 'about') + import os + import conf + # delete other html files + exception_list = ['app.html', 'unsupported.html', 'blank.html'] + conf_dir = os.path.dirname(os.path.abspath(conf.__file__)) + public_path = os.path.join(conf_dir, 'public') + for f in os.listdir(public_path): + if f.endswith('.html') and f not in exception_list: + os.remove(os.path.join(public_path, f)) + def save_pages(): """save all web pages, blogs to create content""" query_map = { diff --git a/install_erpnext.py b/install_erpnext.py index abd4f83213..75a44aee11 100644 --- a/install_erpnext.py +++ b/install_erpnext.py @@ -127,7 +127,7 @@ NameVirtualHost *:99 # directory specific options - Options +Indexes +FollowSymLinks +ExecCGI + Options -Indexes +FollowSymLinks +ExecCGI # directory's index file DirectoryIndex web.py