Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
ace9aaac
Commit
ace9aaac
authored
Nov 01, 2012
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extra logging
parent
4383eef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
form.py
flask_admin/contrib/sqlamodel/form.py
+1
-0
view.py
flask_admin/contrib/sqlamodel/view.py
+5
-0
No files found.
flask_admin/contrib/sqlamodel/form.py
View file @
ace9aaac
...
...
@@ -396,6 +396,7 @@ class InlineModelConverter(InlineModelConverterBase):
hidden_pk
=
True
)
# Post-process form
print
info
,
info
.
postprocess_form
child_form
=
info
.
postprocess_form
(
child_form
)
# Contribute field
...
...
flask_admin/contrib/sqlamodel/view.py
View file @
ace9aaac
import
logging
from
sqlalchemy.orm.attributes
import
InstrumentedAttribute
from
sqlalchemy.orm
import
subqueryload
from
sqlalchemy.sql.expression
import
desc
...
...
@@ -623,6 +625,7 @@ class ModelView(BaseModelView):
return
True
except
Exception
,
ex
:
flash
(
gettext
(
'Failed to create model.
%(error)
s'
,
error
=
str
(
ex
)),
'error'
)
logging
.
exception
(
'Failed to create model'
)
self
.
session
.
rollback
()
return
False
...
...
@@ -642,6 +645,7 @@ class ModelView(BaseModelView):
return
True
except
Exception
,
ex
:
flash
(
gettext
(
'Failed to update model.
%(error)
s'
,
error
=
str
(
ex
)),
'error'
)
logging
.
exception
(
'Failed to update model'
)
self
.
session
.
rollback
()
return
False
...
...
@@ -660,6 +664,7 @@ class ModelView(BaseModelView):
return
True
except
Exception
,
ex
:
flash
(
gettext
(
'Failed to delete model.
%(error)
s'
,
error
=
str
(
ex
)),
'error'
)
logging
.
exception
(
'Failed to delete model'
)
self
.
session
.
rollback
()
return
False
...
...
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