Merge branch 'master' into dev
This commit is contained in:
commit
aa3ab5ec59
@ -104,7 +104,7 @@ def add_comment(args=None):
|
|||||||
|
|
||||||
return comment_html
|
return comment_html
|
||||||
|
|
||||||
def get_content(blog_page_name):
|
def get_blog_content(blog_page_name):
|
||||||
import website.web_cache
|
import website.web_cache
|
||||||
content = website.web_cache.get_html(blog_page_name)
|
content = website.web_cache.get_html(blog_page_name)
|
||||||
|
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
<div class="help">By {{ full_name }} on {{ updated }}</div>
|
<div class="help">By {{ full_name }} on {{ updated }}</div>
|
||||||
<br>
|
<br>
|
||||||
{{ content_html }}
|
{{ content_html }}
|
||||||
|
<!-- end blog content -->
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
<h3>Comments</h3><br>
|
<h3>Comments</h3><br>
|
||||||
<div class="blog-comments">
|
<div class="blog-comments">
|
||||||
@ -32,10 +34,9 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% include 'html/comment.html' %}
|
{% include 'html/comment.html' %}
|
||||||
</div>
|
|
||||||
<!-- end blog content -->
|
|
||||||
|
|
||||||
<button class="btn add-comment">Add Comment</button>
|
<button class="btn add-comment">Add Comment</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="layout-side-section">
|
<div class="layout-side-section">
|
||||||
|
@ -26,7 +26,7 @@ wn.pages['{{ name }}'].onload = function(wrapper) {
|
|||||||
data.content += repl('... <a href="%(name)s.html">(read on)</a>', data);
|
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>\
|
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
|
page_length: 10
|
||||||
});
|
});
|
||||||
|
@ -219,7 +219,7 @@ def delete_cache(page_name):
|
|||||||
import webnotes
|
import webnotes
|
||||||
webnotes.conn.sql("""delete from `tabWeb Cache` where name=%s""", page_name)
|
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"""
|
"""delete and re-create web cache entries"""
|
||||||
import webnotes
|
import webnotes
|
||||||
|
|
||||||
@ -239,7 +239,9 @@ def refresh_cache():
|
|||||||
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
for result in webnotes.conn.sql(query_map[dt], as_dict=1):
|
||||||
create_cache(result['page_name'], dt, result['name'])
|
create_cache(result['page_name'], dt, result['name'])
|
||||||
clear_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():
|
for page_name in get_predefined_pages():
|
||||||
create_cache(page_name, None, None)
|
create_cache(page_name, None, None)
|
||||||
clear_cache(page_name, None, None)
|
clear_cache(page_name, None, None)
|
||||||
|
if build: load_into_cache(page_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user