From b8ec3e7ecb52c0b6f1aaa0cfe2c84d1aefc6850d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 11 Mar 2013 14:29:09 +0530 Subject: [PATCH] renamed blog to blog_post and refresh issues --- .../p03_rename_blog_to_blog_post.py | 8 +++++++ patches/patch_list.py | 3 ++- website/doctype/blog/__init__.py | 1 - .../doctype/blog/locale/_messages_doc.json | 12 ---------- website/doctype/blog/locale/ar-doc.json | 10 --------- website/doctype/blog/locale/de-doc.json | 10 --------- website/doctype/blog/locale/es-doc.json | 10 --------- website/doctype/blog/locale/fr-doc.json | 10 --------- website/doctype/blog/locale/hi-doc.json | 10 --------- website/doctype/blog/locale/hr-doc.json | 10 --------- website/doctype/blog/locale/nl-doc.json | 10 --------- website/doctype/blog/locale/pt-BR-doc.json | 12 ---------- website/doctype/blog/locale/pt-doc.json | 10 --------- website/doctype/blog/locale/sr-doc.json | 10 --------- website/doctype/blog/locale/ta-doc.json | 10 --------- website/doctype/blog/locale/th-doc.json | 10 --------- website/doctype/blog_post/__init__.py | 0 .../{blog/blog.js => blog_post/blog_post.js} | 0 .../{blog/blog.py => blog_post/blog_post.py} | 15 ++++++++----- .../blog.txt => blog_post/blog_post.txt} | 16 +++++++++----- website/doctype/blogger/blogger.py | 8 +++++-- website/doctype/blogger/blogger.txt | 11 ++++++++-- website/helpers/blog.py | 22 +++++++++++++------ website/helpers/blog_feed.py | 2 +- website/page/website_home/website_home.js | 6 ++--- website/utils.py | 2 +- 26 files changed, 66 insertions(+), 162 deletions(-) create mode 100644 patches/march_2013/p03_rename_blog_to_blog_post.py delete mode 100644 website/doctype/blog/__init__.py delete mode 100644 website/doctype/blog/locale/_messages_doc.json delete mode 100644 website/doctype/blog/locale/ar-doc.json delete mode 100644 website/doctype/blog/locale/de-doc.json delete mode 100644 website/doctype/blog/locale/es-doc.json delete mode 100644 website/doctype/blog/locale/fr-doc.json delete mode 100644 website/doctype/blog/locale/hi-doc.json delete mode 100644 website/doctype/blog/locale/hr-doc.json delete mode 100644 website/doctype/blog/locale/nl-doc.json delete mode 100644 website/doctype/blog/locale/pt-BR-doc.json delete mode 100644 website/doctype/blog/locale/pt-doc.json delete mode 100644 website/doctype/blog/locale/sr-doc.json delete mode 100644 website/doctype/blog/locale/ta-doc.json delete mode 100644 website/doctype/blog/locale/th-doc.json create mode 100644 website/doctype/blog_post/__init__.py rename website/doctype/{blog/blog.js => blog_post/blog_post.js} (100%) rename website/doctype/{blog/blog.py => blog_post/blog_post.py} (88%) rename website/doctype/{blog/blog.txt => blog_post/blog_post.txt} (89%) diff --git a/patches/march_2013/p03_rename_blog_to_blog_post.py b/patches/march_2013/p03_rename_blog_to_blog_post.py new file mode 100644 index 0000000000..e7f8b454e3 --- /dev/null +++ b/patches/march_2013/p03_rename_blog_to_blog_post.py @@ -0,0 +1,8 @@ +import webnotes + +def execute(): + webnotes.reload_doc('website', 'doctype', 'blogger') + webnotes.conn.sql('''update tabBlogger set posts=(select count(*) + from tabBlog where ifnull(blogger,"")=tabBlogger.name)''') + webnotes.rename_doc("DocType", "Blog", "Blog Post", force=True) + webnotes.conn.sql("""update `tabBlog Post` set published_on=creation""") diff --git a/patches/patch_list.py b/patches/patch_list.py index 23e3d4ce8c..bff51a9ae0 100644 --- a/patches/patch_list.py +++ b/patches/patch_list.py @@ -210,5 +210,6 @@ patch_list = [ "execute:webnotes.conn.sql('update tabDocPerm set `submit`=1, `cancel`=1, `amend`=1 where parent=\"Time Log\"')", "execute:webnotes.delete_doc('DocType', 'Attendance Control Panel')", "patches.march_2013.p02_get_global_default", - "execute:webnotes.bean('Style Settings', 'Style Settings').save()" + "execute:webnotes.bean('Style Settings', 'Style Settings').save()", + "patches.march_2013.p03_rename_blog_to_blog_post", ] \ No newline at end of file diff --git a/website/doctype/blog/__init__.py b/website/doctype/blog/__init__.py deleted file mode 100644 index baffc48825..0000000000 --- a/website/doctype/blog/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from __future__ import unicode_literals diff --git a/website/doctype/blog/locale/_messages_doc.json b/website/doctype/blog/locale/_messages_doc.json deleted file mode 100644 index 90697bdf72..0000000000 --- a/website/doctype/blog/locale/_messages_doc.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - "Website", - "Content", - "Title", - "Blog Intro", - "Page Name", - "Blog", - "Email Sent", - "File List", - "Published", - "Description for listing page, in plain text, only a couple of lines." -] \ No newline at end of file diff --git a/website/doctype/blog/locale/ar-doc.json b/website/doctype/blog/locale/ar-doc.json deleted file mode 100644 index 10ecf122d5..0000000000 --- a/website/doctype/blog/locale/ar-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "\u0628\u0644\u0648\u0642", - "Content": "\u0645\u062d\u062a\u0648\u0649", - "Email Sent": "\u0625\u0631\u0633\u0627\u0644 \u0627\u0644\u0628\u0631\u064a\u062f \u0627\u0644\u0625\u0644\u0643\u062a\u0631\u0648\u0646\u064a", - "File List": "\u0645\u0644\u0641 \u0642\u0627\u0626\u0645\u0629", - "Page Name": "\u0627\u0644\u0635\u0641\u062d\u0629 \u0627\u0633\u0645", - "Published": "\u0646\u0634\u0631\u062a", - "Title": "\u0644\u0642\u0628", - "Website": "\u0627\u0644\u0645\u0648\u0642\u0639" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/de-doc.json b/website/doctype/blog/locale/de-doc.json deleted file mode 100644 index a4f001348d..0000000000 --- a/website/doctype/blog/locale/de-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Inhalt", - "Email Sent": "E-Mail gesendet", - "File List": "Dateiliste", - "Page Name": "Page Name", - "Published": "Ver\u00f6ffentlicht", - "Title": "Titel", - "Website": "Webseite" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/es-doc.json b/website/doctype/blog/locale/es-doc.json deleted file mode 100644 index 727ca1257c..0000000000 --- a/website/doctype/blog/locale/es-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Contenido", - "Email Sent": "Correo electr\u00f3nico enviado", - "File List": "Lista de archivos", - "Page Name": "Nombre p\u00e1gina", - "Published": "Publicado", - "Title": "T\u00edtulo", - "Website": "Sitio web" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/fr-doc.json b/website/doctype/blog/locale/fr-doc.json deleted file mode 100644 index d30abca1d4..0000000000 --- a/website/doctype/blog/locale/fr-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Teneur", - "Email Sent": "Courriel a \u00e9t\u00e9 envoy\u00e9", - "File List": "Liste des fichiers", - "Page Name": "Nom de la page", - "Published": "Publi\u00e9", - "Title": "Titre", - "Website": "Site Web" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/hi-doc.json b/website/doctype/blog/locale/hi-doc.json deleted file mode 100644 index 5191c3a4ad..0000000000 --- a/website/doctype/blog/locale/hi-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "\u092c\u094d\u0932\u0949\u0917", - "Content": "\u0938\u093e\u092e\u0917\u094d\u0930\u0940", - "Email Sent": "\u0908\u092e\u0947\u0932 \u092d\u0947\u091c\u093e \u0917\u092f\u093e", - "File List": "\u092b\u093c\u093e\u0907\u0932 \u0938\u0942\u091a\u0940", - "Page Name": "\u092a\u0947\u091c \u0915\u093e \u0928\u093e\u092e", - "Published": "\u092a\u094d\u0930\u0915\u093e\u0936\u093f\u0924", - "Title": "\u0936\u0940\u0930\u094d\u0937\u0915", - "Website": "\u0935\u0947\u092c\u0938\u093e\u0907\u091f" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/hr-doc.json b/website/doctype/blog/locale/hr-doc.json deleted file mode 100644 index b77e5aca35..0000000000 --- a/website/doctype/blog/locale/hr-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Sadr\u017eaj", - "Email Sent": "E-mail poslan", - "File List": "Popis datoteka", - "Page Name": "Stranica Ime", - "Published": "Objavljen", - "Title": "Naslov", - "Website": "Website" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/nl-doc.json b/website/doctype/blog/locale/nl-doc.json deleted file mode 100644 index 08aca3d44c..0000000000 --- a/website/doctype/blog/locale/nl-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Inhoud", - "Email Sent": "E-mail verzonden", - "File List": "File List", - "Page Name": "Page Name", - "Published": "Gepubliceerd", - "Title": "Titel", - "Website": "Website" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/pt-BR-doc.json b/website/doctype/blog/locale/pt-BR-doc.json deleted file mode 100644 index b30e539a05..0000000000 --- a/website/doctype/blog/locale/pt-BR-doc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "Blog": "Blog", - "Blog Intro": "Blog Intro", - "Content": "Conte\u00fado", - "Description for listing page, in plain text, only a couple of lines.": "Descri\u00e7\u00e3o p\u00e1gina de listagem, em texto simples, apenas um par de linhas.", - "Email Sent": "E-mail enviado", - "File List": "Lista de Arquivos", - "Page Name": "Nome da P\u00e1gina", - "Published": "Publicado", - "Title": "T\u00edtulo", - "Website": "Site" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/pt-doc.json b/website/doctype/blog/locale/pt-doc.json deleted file mode 100644 index 39bc7d4009..0000000000 --- a/website/doctype/blog/locale/pt-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "Blog", - "Content": "Conte\u00fado", - "Email Sent": "E-mail enviado", - "File List": "Lista de Arquivos", - "Page Name": "Nome da P\u00e1gina", - "Published": "Publicado", - "Title": "T\u00edtulo", - "Website": "Site" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/sr-doc.json b/website/doctype/blog/locale/sr-doc.json deleted file mode 100644 index 2b67eecdfe..0000000000 --- a/website/doctype/blog/locale/sr-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "\u0411\u043b\u043e\u0433", - "Content": "\u0421\u0430\u0434\u0440\u0436\u0438\u043d\u0430", - "Email Sent": "\u0415\u043c\u0430\u0438\u043b \u0421\u0435\u043d\u0442", - "File List": "\u0424\u0438\u043b\u0435 \u041b\u0438\u0441\u0442", - "Page Name": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u0418\u043c\u0435", - "Published": "\u041e\u0431\u0458\u0430\u0432\u0459\u0435\u043d", - "Title": "\u041d\u0430\u0441\u043b\u043e\u0432", - "Website": "\u0412\u0435\u0431\u0441\u0430\u0458\u0442" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/ta-doc.json b/website/doctype/blog/locale/ta-doc.json deleted file mode 100644 index c34c1926bb..0000000000 --- a/website/doctype/blog/locale/ta-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "\u0bb5\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0ba4\u0bbf\u0bb5\u0bc1", - "Content": "\u0b89\u0bb3\u0bcd\u0bb3\u0b9f\u0b95\u0bcd\u0b95\u0bae\u0bcd", - "Email Sent": "\u0bae\u0bbf\u0ba9\u0bcd\u0ba9\u0b9e\u0bcd\u0b9a\u0bb2\u0bcd \u0b85\u0ba9\u0bc1\u0baa\u0bcd\u0baa\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f\u0ba4\u0bc1", - "File List": "\u0b95\u0bc7\u0bbe\u0baa\u0bcd\u0baa\u0bc1 \u0baa\u0b9f\u0bcd\u0b9f\u0bbf\u0baf\u0bb2\u0bcd", - "Page Name": "\u0baa\u0b95\u0bcd\u0b95\u0bae\u0bcd \u0baa\u0bc6\u0baf\u0bb0\u0bcd", - "Published": "\u0bb5\u0bc6\u0bb3\u0bbf\u0baf\u0bbf\u0b9f\u0baa\u0bcd\u0baa\u0b9f\u0bcd\u0b9f", - "Title": "\u0ba4\u0bb2\u0bc8\u0baa\u0bcd\u0baa\u0bc1", - "Website": "\u0b87\u0ba3\u0bc8\u0baf\u0ba4\u0bb3\u0bae\u0bcd" -} \ No newline at end of file diff --git a/website/doctype/blog/locale/th-doc.json b/website/doctype/blog/locale/th-doc.json deleted file mode 100644 index e043a41d7a..0000000000 --- a/website/doctype/blog/locale/th-doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Blog": "\u0e1a\u0e25\u0e47\u0e2d\u0e01", - "Content": "\u0e40\u0e19\u0e37\u0e49\u0e2d\u0e2b\u0e32", - "Email Sent": "\u0e2d\u0e35\u0e40\u0e21\u0e25\u0e17\u0e35\u0e48\u0e2a\u0e48\u0e07", - "File List": "\u0e23\u0e32\u0e22\u0e0a\u0e37\u0e48\u0e2d\u0e44\u0e1f\u0e25\u0e4c", - "Page Name": "\u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e1e\u0e08", - "Published": "\u0e40\u0e1c\u0e22\u0e41\u0e1e\u0e23\u0e48", - "Title": "\u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07", - "Website": "\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c" -} \ No newline at end of file diff --git a/website/doctype/blog_post/__init__.py b/website/doctype/blog_post/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/website/doctype/blog/blog.js b/website/doctype/blog_post/blog_post.js similarity index 100% rename from website/doctype/blog/blog.js rename to website/doctype/blog_post/blog_post.js diff --git a/website/doctype/blog/blog.py b/website/doctype/blog_post/blog_post.py similarity index 88% rename from website/doctype/blog/blog.py rename to website/doctype/blog_post/blog_post.py index c9ddda6122..1664b4fca5 100644 --- a/website/doctype/blog/blog.py +++ b/website/doctype/blog_post/blog_post.py @@ -32,9 +32,14 @@ class DocType: if self.doc.blog_intro: self.doc.blog_intro = self.doc.blog_intro[:140] + # update posts + webnotes.conn.sql("""update tabBlogger set posts=(select count(*) from `tabBlog Post` + where ifnull(blogger,'')=tabBlogger.name) + where name=%s""", self.doc.blogger) + def on_update(self): - from website.utils import update_page_name - update_page_name(self.doc, self.doc.title) + website.utils.update_page_name(self.doc, self.doc.title) + website.utils.delete_page_cache("writers") def send_emails(self): """send emails to subscribers""" @@ -45,8 +50,8 @@ class DocType: import webnotes.utils # get leads that are subscribed to the blog - recipients = [e[0] for e in webnotes.conn.sql("""select distinct email_id from tabLead where - ifnull(blog_subscriber,0)=1""")] + recipients = [e[0] for e in webnotes.conn.sql("""select distinct email_id from + tabLead where ifnull(blog_subscriber,0)=1""")] # make heading as link content = '

%s

\n\n%s' % (webnotes.utils.get_request_site_address(), @@ -88,7 +93,7 @@ class DocType: comment_list = webnotes.conn.sql("""\ select comment, comment_by_fullname, creation - from `tabComment` where comment_doctype="Blog" + from `tabComment` where comment_doctype="Blog Post" and comment_docname=%s order by creation""", self.doc.name, as_dict=1) self.doc.comment_list = comment_list or [] diff --git a/website/doctype/blog/blog.txt b/website/doctype/blog_post/blog_post.txt similarity index 89% rename from website/doctype/blog/blog.txt rename to website/doctype/blog_post/blog_post.txt index e4c92c2e2d..1d90824170 100644 --- a/website/doctype/blog/blog.txt +++ b/website/doctype/blog_post/blog_post.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-01-25 11:35:09", + "creation": "2013-03-08 11:36:50", "docstatus": 0, - "modified": "2013-03-08 09:41:37", + "modified": "2013-03-11 14:26:24", "modified_by": "Administrator", "owner": "Administrator" }, @@ -16,7 +16,7 @@ { "doctype": "DocField", "name": "__common__", - "parent": "Blog", + "parent": "Blog Post", "parentfield": "fields", "parenttype": "DocType", "permlevel": 0 @@ -24,7 +24,7 @@ { "doctype": "DocPerm", "name": "__common__", - "parent": "Blog", + "parent": "Blog Post", "parentfield": "permissions", "parenttype": "DocType", "permlevel": 0, @@ -34,7 +34,7 @@ }, { "doctype": "DocType", - "name": "Blog" + "name": "Blog Post" }, { "doctype": "DocField", @@ -49,6 +49,12 @@ "fieldtype": "Check", "label": "Published" }, + { + "doctype": "DocField", + "fieldname": "published_on", + "fieldtype": "Date", + "label": "Published On" + }, { "doctype": "DocField", "fieldname": "column_break_3", diff --git a/website/doctype/blogger/blogger.py b/website/doctype/blogger/blogger.py index 926f7a279d..a16867dfc1 100644 --- a/website/doctype/blogger/blogger.py +++ b/website/doctype/blogger/blogger.py @@ -9,10 +9,14 @@ class DocType: def on_update(self): "if profile is set, then update all older blogs" + + from website.helpers.blog import clear_blog_cache + clear_blog_cache() + if self.doc.profile: - for blog in webnotes.conn.sql_list("""select name from tabBlog where owner=%s + for blog in webnotes.conn.sql_list("""select name from `tabBlog Post` where owner=%s and ifnull(blogger,'')=''""", self.doc.profile): - b = webnotes.bean("Blog", blog) + b = webnotes.bean("Blog Post", blog) b.doc.blogger = self.doc.name b.save() diff --git a/website/doctype/blogger/blogger.txt b/website/doctype/blogger/blogger.txt index 01e0ceae20..7f741c523c 100644 --- a/website/doctype/blogger/blogger.txt +++ b/website/doctype/blogger/blogger.txt @@ -1,8 +1,8 @@ [ { - "creation": "2013-03-07 16:28:19", + "creation": "2013-03-08 11:36:52", "docstatus": 0, - "modified": "2013-03-07 16:33:37", + "modified": "2013-03-11 14:00:37", "modified_by": "Administrator", "owner": "Administrator" }, @@ -73,6 +73,13 @@ "label": "Avatar", "options": "attach_files:" }, + { + "doctype": "DocField", + "fieldname": "posts", + "fieldtype": "Int", + "label": "Posts", + "read_only": 1 + }, { "doctype": "DocField", "fieldname": "file_list", diff --git a/website/helpers/blog.py b/website/helpers/blog.py index d90c85aad0..ec57105e35 100644 --- a/website/helpers/blog.py +++ b/website/helpers/blog.py @@ -6,6 +6,13 @@ import webnotes import website.utils from webnotes import _ +def clear_blog_cache(): + for blog in webnotes.conn.sql_list("""select page_name from + `tabBlog Post` where ifnull(published,0)=1"""): + website.utils.delete_page_cache(blog) + + website.utils.delete_page_cache("writers") + @webnotes.whitelist(allow_guest=True) def get_blog_list(start=0, by=None, category=None): import webnotes @@ -16,17 +23,17 @@ def get_blog_list(start=0, by=None, category=None): condition += " and t1.blog_category='%s'" % category.replace("'", "\'") query = """\ select - t1.title, t1.name, t1.page_name, t1.creation as creation, + t1.title, t1.name, t1.page_name, t1.published_on as creation, ifnull(t1.blog_intro, t1.content) as content, t2.full_name, t2.avatar, t1.blogger, (select count(name) from `tabComment` where - comment_doctype='Blog' and comment_docname=t1.name) as comments - from `tabBlog` t1, `tabBlogger` t2 + comment_doctype='Blog Post' and comment_docname=t1.name) as comments + from `tabBlog Post` t1, `tabBlogger` t2 where ifnull(t1.published,0)=1 and t1.blogger = t2.name %(condition)s - order by creation desc, name asc - limit %(start)s, 5""" % {"start": start, "condition": condition} + order by published_on desc, name asc + limit %(start)s, 20""" % {"start": start, "condition": condition} result = webnotes.conn.sql(query, as_dict=1) @@ -79,7 +86,7 @@ def add_comment(args=None): comment_doctype='Blog' and comment_docname=%s and ifnull(unsubscribed, 0)=0""", args.get('comment_docname'))] - blog = webnotes.conn.sql("""select * from tabBlog where name=%s""", + blog = webnotes.conn.sql("""select * from `tabBlog Post` where name=%s""", args.get('comment_docname'), as_dict=1)[0] from webnotes.utils.email_lib.bulk import send @@ -125,7 +132,8 @@ def get_blog_template_args(): } def get_writers_args(): - bloggers = webnotes.conn.sql("select * from `tabBlogger` order by full_name", as_dict=1) + bloggers = webnotes.conn.sql("""select * from `tabBlogger` + order by posts desc""", as_dict=1) for blogger in bloggers: if blogger.avatar and not "/" in blogger.avatar: blogger.avatar = "files/" + blogger.avatar diff --git a/website/helpers/blog_feed.py b/website/helpers/blog_feed.py index 20c78cae2a..19fc5d8ec6 100644 --- a/website/helpers/blog_feed.py +++ b/website/helpers/blog_feed.py @@ -57,7 +57,7 @@ def generate(): items = '' blog_list = webnotes.conn.sql("""\ - select page_name as name, modified, creation, title from tabBlog + select page_name as name, modified, creation, title from `tabBlog Post` where ifnull(published,0)=1 order by creation desc, modified desc, name asc limit 100""", as_dict=1) diff --git a/website/page/website_home/website_home.js b/website/page/website_home/website_home.js index 4a7addd773..d92c3c0d4d 100644 --- a/website/page/website_home/website_home.js +++ b/website/page/website_home/website_home.js @@ -23,9 +23,9 @@ wn.module_page["Website"] = [ icon: "icon-edit", items: [ { - label: wn._("Blog"), - description: wn._("Blog post."), - doctype:"Blog" + label: wn._("Blog Post"), + description: wn._("Single Post (article)."), + doctype:"Blog Post" }, { label: wn._("Blogger"), diff --git a/website/utils.py b/website/utils.py index a9569b4722..1d07c63811 100644 --- a/website/utils.py +++ b/website/utils.py @@ -25,7 +25,7 @@ page_map = { "template": 'html/web_page.html', "condition_field": "published" }), - 'Blog': webnotes._dict({ + 'Blog Post': webnotes._dict({ "template": 'html/blog_page.html', "condition_field": "published", }),