From 6db2ac51e6440f24c1a5c8f72b224d5494698277 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 23 Aug 2012 15:24:21 +0530 Subject: [PATCH] changed blog comments date format to global date format i.e. 1 January 2012 --- erpnext/patches/august_2012/changed_blog_date_format.py | 4 ++++ erpnext/patches/patch_list.py | 4 ++++ erpnext/website/doctype/blog/blog.py | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 erpnext/patches/august_2012/changed_blog_date_format.py diff --git a/erpnext/patches/august_2012/changed_blog_date_format.py b/erpnext/patches/august_2012/changed_blog_date_format.py new file mode 100644 index 0000000000..d2dd87069c --- /dev/null +++ b/erpnext/patches/august_2012/changed_blog_date_format.py @@ -0,0 +1,4 @@ +def execute(): + import webnotes + from webnotes.model.doclist import DocList + DocList("Website Settings", "Website Settings").save() \ No newline at end of file diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py index 83da5c3fa3..5a0a9d7857 100644 --- a/erpnext/patches/patch_list.py +++ b/erpnext/patches/patch_list.py @@ -521,4 +521,8 @@ patch_list = [ 'patch_module': 'patches.august_2012', 'patch_file': 'report_supplier_quotations', }, + { + 'patch_module': 'patches.august_2012', + 'patch_file': 'changed_blog_date_format', + }, ] \ No newline at end of file diff --git a/erpnext/website/doctype/blog/blog.py b/erpnext/website/doctype/blog/blog.py index 786941c7e1..fc389d09d7 100644 --- a/erpnext/website/doctype/blog/blog.py +++ b/erpnext/website/doctype/blog/blog.py @@ -83,4 +83,4 @@ class DocType(website.web_page.Page): self.doc.comment_list = comment_list or [] for comment in self.doc.comment_list: - comment['comment_date'] = webnotes.utils.pretty_date(comment['creation']) \ No newline at end of file + comment['comment_date'] = webnotes.utils.global_date_format(comment['creation']) \ No newline at end of file