Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_course_order
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
彭熊
tamp_course_order
Commits
cd469b34
Commit
cd469b34
authored
Dec 02, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
启动配置
parent
cb9d2e45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
__main__.py
app/api/__main__.py
+1
-4
errorhandler.py
app/controller/errorhandler.py
+1
-0
No files found.
app/api/__main__.py
View file @
cd469b34
...
@@ -10,8 +10,5 @@ from app.api.app import app
...
@@ -10,8 +10,5 @@ from app.api.app import app
from
app.api.engine
import
env
from
app.api.engine
import
env
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
if
env
==
'dev'
:
app
.
run
(
'0.0.0.0'
,
port
=
80
,
debug
=
True
)
app
.
run
(
'0.0.0.0'
,
port
=
80
,
debug
=
True
)
else
:
app
.
run
(
'0.0.0.0'
,
port
=
80
,
debug
=
False
)
app/controller/errorhandler.py
View file @
cd469b34
...
@@ -28,6 +28,7 @@ class CustomFlaskErr(Exception):
...
@@ -28,6 +28,7 @@ class CustomFlaskErr(Exception):
self
.
status_code
=
status_code
self
.
status_code
=
status_code
self
.
payload
=
payload
self
.
payload
=
payload
# 构造要返回的错误代码和错误信息的 dict
# 构造要返回的错误代码和错误信息的 dict
def
to_dict
(
self
):
def
to_dict
(
self
):
rv
=
dict
(
self
.
payload
or
())
rv
=
dict
(
self
.
payload
or
())
...
...
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