Merge branch 'master' into dev
diff --git a/erpnext/website/blog.py b/erpnext/website/blog.py
index 8c367fe..d8f0fd9 100644
--- a/erpnext/website/blog.py
+++ b/erpnext/website/blog.py
@@ -104,7 +104,7 @@
return comment_html
-def get_content(blog_page_name):
+def get_blog_content(blog_page_name):
import website.web_cache
content = website.web_cache.get_html(blog_page_name)
diff --git a/erpnext/website/templates/html/blog_page.html b/erpnext/website/templates/html/blog_page.html
index c07706a..e9c1646 100644
--- a/erpnext/website/templates/html/blog_page.html
+++ b/erpnext/website/templates/html/blog_page.html
@@ -20,6 +20,8 @@
<div class="help">By {{ full_name }} on {{ updated }}</div>
<br>
{{ content_html }}
+ <!-- end blog content -->
+
<hr>
<h3>Comments</h3><br>
<div class="blog-comments">
@@ -32,10 +34,9 @@
{% endif %}
{% include 'html/comment.html' %}
+
+ <button class="btn add-comment">Add Comment</button>
</div>
- <!-- end blog content -->
-
- <button class="btn add-comment">Add Comment</button>
</div>
<div class="layout-side-section">
diff --git a/erpnext/website/templates/js/blog.js b/erpnext/website/templates/js/blog.js
index 3ccc7d4..78dd3b7 100644
--- a/erpnext/website/templates/js/blog.js
+++ b/erpnext/website/templates/js/blog.js
@@ -26,7 +26,7 @@
data.content += repl('... <a href="%(name)s.html">(read on)</a>', data);
}
parent.innerHTML = repl('<h2><a href="%(name)s.html">%(title)s</a></h2>\
- <p>%(content)s</p><br>', data);
+ %(content)s<br /><br />', data);
},
page_length: 10
});
diff --git a/erpnext/website/web_cache.py b/erpnext/website/web_cache.py
index 18b10b6..21ec6a8 100644
--- a/erpnext/website/web_cache.py
+++ b/erpnext/website/web_cache.py
@@ -219,7 +219,7 @@
import webnotes
webnotes.conn.sql("""delete from `tabWeb Cache` where name=%s""", page_name)
-def refresh_cache():
+def refresh_cache(build=False):
"""delete and re-create web cache entries"""
import webnotes
@@ -239,7 +239,9 @@
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
create_cache(result['page_name'], dt, result['name'])
clear_cache(result['page_name'], dt, result['name'])
+ if build: load_into_cache(result['page_name'])
for page_name in get_predefined_pages():
create_cache(page_name, None, None)
- clear_cache(page_name, None, None)
\ No newline at end of file
+ clear_cache(page_name, None, None)
+ if build: load_into_cache(page_name)