Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
credit-report-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
credit-report-api
Commits
3359bf34
Commit
3359bf34
authored
Aug 23, 2019
by
张鹏程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改文件上传路径的bug
parent
59ebcafe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
46 deletions
+14
-46
ReportAnalysis_Handler.py
handler/ReportAnalysis_Handler.py
+2
-33
UpLoadFiles_Handler.py
handler/UpLoadFiles_Handler.py
+0
-1
startup.py
startup.py
+12
-12
No files found.
handler/ReportAnalysis_Handler.py
View file @
3359bf34
...
...
@@ -15,7 +15,7 @@ from service.InitHtml_Service import InitHtml # 初始化HTML
class
ReportAnalysis
(
BaseHandler
):
def
post
(
self
):
self
.
_filepath
=
self
.
get_argument
(
'file
path
'
,
default
=
None
)
self
.
_filepath
=
self
.
get_argument
(
'file
name
'
,
default
=
None
)
self
.
_isdownload
=
self
.
get_argument
(
'isdownload'
,
default
=
None
)
if
self
.
_filepath
==
None
or
self
.
_filepath
==
''
:
self
.
write
(
JsonUtil
.
build_json
(
code
=
JsonUtil
.
Constants
.
Code_Params_Error
,
...
...
@@ -23,7 +23,7 @@ class ReportAnalysis(BaseHandler):
self
.
flush
()
else
:
filepath
=
self
.
_filepath
filepath
=
se
ttings
.
HTML_PATH
+
'/'
+
se
lf
.
_filepath
isFile
=
False
try
:
with
open
(
filepath
,
'rb'
)
as
f
:
...
...
@@ -74,34 +74,3 @@ class ReportAnalysis(BaseHandler):
))
self
.
flush
()
# import json
# outpath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/provinces.json'
# with open(outpath,"w+",encoding="utf-8") as f:
# _json = json.dumps(Result.get_result())
# f.write(_json)
# f.close()
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/432325197803211379.html'
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/13082119950823527X.htm'
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/32052219780226051X.htm'
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/140427198607030038.htm'
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/330682198805122815.htm'
# filepath = r'/Users/zhangpengcheng/Documents/量化派代码管理/credit_report/html/一代征信报告/440421198210078001.html'
# def run(self):
# if self._target is not None:
# self._return = self._target(*self._args, **self._kwargs)
#
# def get_return(self):
# try:
# return self._return
# except Exception:
# return None
#
# def join(self):
# threading.Thread.join(self)
# return self._return
\ No newline at end of file
handler/UpLoadFiles_Handler.py
View file @
3359bf34
...
...
@@ -15,7 +15,6 @@ class UpLoadFiles(BaseHandler):
else
:
filepath
=
self
.
_filepath
isFile
=
False
try
:
with
open
(
filepath
,
'rb'
)
as
f
:
with
open
(
settings
.
HTML_PATH
+
'/'
+
self
.
_filepath
.
split
(
'/'
)[
-
1
],
'wb+'
)
as
f_to
:
...
...
startup.py
View file @
3359bf34
...
...
@@ -38,19 +38,19 @@ def apps():
if
__name__
==
"__main__"
:
#
app = apps()
#
server = HTTPServer(app)
#
[i.setFormatter(LogFormatter()) for i in logging.getLogger().handlers]
#
tornado.options.parse_command_line()
app
=
apps
()
server
=
HTTPServer
(
app
)
[
i
.
setFormatter
(
LogFormatter
())
for
i
in
logging
.
getLogger
()
.
handlers
]
tornado
.
options
.
parse_command_line
()
# #== 本地调试
#
app.listen(20011)
#
IOLoop.instance().start()
app
.
listen
(
20011
)
IOLoop
.
instance
()
.
start
()
tornado
.
options
.
parse_command_line
()
app
=
apps
()
http_server
=
tornado
.
httpserver
.
HTTPServer
(
app
)
http_server
.
bind
(
options
.
port
)
http_server
.
start
()
tornado
.
ioloop
.
IOLoop
.
instance
()
.
start
()
#
tornado.options.parse_command_line()
#
app = apps()
#
http_server = tornado.httpserver.HTTPServer(app)
#
http_server.bind(options.port)
#
http_server.start()
#
tornado.ioloop.IOLoop.instance().start()
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