Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
66242755
Commit
66242755
authored
Jan 18, 2021
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改模版
parent
483ca1f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
default_template_params.py
app/config/default_template_params.py
+4
-4
jinjia2html_v2.py
app/utils/jinjia2html_v2.py
+2
-1
No files found.
app/config/default_template_params.py
View file @
66242755
...
@@ -49,8 +49,8 @@ hold_default_template = {
...
@@ -49,8 +49,8 @@ hold_default_template = {
'cover_title2': '存续报告',
'cover_title2': '存续报告',
'logo': template_folder + 'logo.png',
'logo': template_folder + 'logo.png',
'brand_name': '小飞象',
'brand_name': '小飞象',
'logo_display': '
block
',
'logo_display': '
table-cell
',
'brand_name_display': '
block
',
'brand_name_display': '
table-cell
',
'financial_text': '我们挣的是⻆度和变化的钱而不是纠正市场错误的钱,市场永远是正确的,关键是在其正确被反复证明后的逆向而行,一定是避开它的正确被展开的过程。',
'financial_text': '我们挣的是⻆度和变化的钱而不是纠正市场错误的钱,市场永远是正确的,关键是在其正确被反复证明后的逆向而行,一定是避开它的正确被展开的过程。',
'cover_back': template_folder + 'cover-back.png',
'cover_back': template_folder + 'cover-back.png',
'scene': template_folder + 'scene.png',
'scene': template_folder + 'scene.png',
...
@@ -97,8 +97,8 @@ diagnose_default_template = {
...
@@ -97,8 +97,8 @@ diagnose_default_template = {
'cover_title2': '存续报告',
'cover_title2': '存续报告',
'logo': template_folder + 'logo.png',
'logo': template_folder + 'logo.png',
'brand_name': '小飞象',
'brand_name': '小飞象',
'logo_display': '
block
',
'logo_display': '
table-cell
',
'brand_name_display': '
block
',
'brand_name_display': '
table-cell
',
'financial_text': '我们挣的是⻆度和变化的钱而不是纠正市场错误的钱,市场永远是正确的,关键是在其正确被反复证明后的逆向而行,一定是避开它的正确被展开的过程。',
'financial_text': '我们挣的是⻆度和变化的钱而不是纠正市场错误的钱,市场永远是正确的,关键是在其正确被反复证明后的逆向而行,一定是避开它的正确被展开的过程。',
'cover_back': template_folder + 'cover-back.png',
'cover_back': template_folder + 'cover-back.png',
'scene': template_folder + 'scene.png',
'scene': template_folder + 'scene.png',
app/utils/jinjia2html_v2.py
View file @
66242755
import
json
import
sys
import
sys
import
time
import
time
import
uuid
import
uuid
...
@@ -296,7 +297,7 @@ class DataIntegrate:
...
@@ -296,7 +297,7 @@ class DataIntegrate:
env
=
Environment
(
loader
=
PackageLoader
(
'app'
,
'templates'
))
# 创建一个包加载器对象
env
=
Environment
(
loader
=
PackageLoader
(
'app'
,
'templates'
))
# 创建一个包加载器对象
# template = env.get_template('monthReport.html') # 获取一个模板文件
# template = env.get_template('monthReport.html') # 获取一个模板文件
template
=
env
.
get_template
(
'/v2/monthReportV2.1.html'
)
# 获取一个模板文件
template
=
env
.
get_template
(
'/v2/monthReportV2.1.html'
)
# 获取一个模板文件
monthReport_html
=
template
.
render
(
self
.
data
)
# 渲染
monthReport_html
=
template
.
render
(
self
.
data
)
.
replace
(
'None'
,
'none'
)
# 渲染
# 保存 monthReport_html
# 保存 monthReport_html
# save_file = "app/html/monthReport.html"
# save_file = "app/html/monthReport.html"
# with open(save_file, 'w', encoding="utf-8") as f:
# with open(save_file, 'w', encoding="utf-8") as f:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment