Post template and blog template

main
bashrc 2026-04-06 15:02:36 +01:00
parent d8a0719731
commit 8ed94746dd
2 changed files with 5 additions and 3 deletions

View File

@ -931,15 +931,16 @@ def html_edit_blog(media_instance: bool, translate: {},
edit_blog_text = \
'<h1">' + translate['Write your post text below.'] + '</h1>'
# load blog template if it exists
dir_str = data_dir(base_dir)
if os.path.isfile(dir_str + '/newpost.txt'):
if os.path.isfile(dir_str + '/newblog.txt'):
try:
with open(dir_str + '/newpost.txt', 'r',
with open(dir_str + '/newblog.txt', 'r',
encoding='utf-8') as fp_blog:
edit_blog_text: str = '<p>' + fp_blog.read() + '</p>'
except OSError:
print('EX: html_edit_blog unable to read ' +
dir_str + '/newpost.txt')
dir_str + '/newblog.txt')
css_filename = base_dir + '/epicyon-profile.css'
if os.path.isfile(base_dir + '/epicyon.css'):

View File

@ -606,6 +606,7 @@ def html_new_post(edit_post_params: {},
translate['Enter the choices for your question below.'] + \
'</h1>\n'
# load post template if it exists
dir_str = data_dir(base_dir)
if os.path.isfile(dir_str + '/newpost.txt'):
try: