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
3e074fba
Commit
3e074fba
authored
Mar 26, 2016
by
Tom Kedem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolved conflict.
parent
b4fb6ef6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
view.py
flask_admin/contrib/sqla/view.py
+8
-2
No files found.
flask_admin/contrib/sqla/view.py
View file @
3e074fba
...
@@ -484,7 +484,10 @@ class ModelView(BaseModelView):
...
@@ -484,7 +484,10 @@ class ModelView(BaseModelView):
"Failed on: {0}"
.
format
(
c
))
"Failed on: {0}"
.
format
(
c
))
else
:
else
:
# column is in same table, use only model attribute name
# column is in same table, use only model attribute name
column_name
=
column
.
key
if
hasattr
(
column
,
'key'
)
and
column
.
key
else
text_type
(
c
)
if
getattr
(
column
,
'key'
,
None
)
is
not
None
:
column_name
=
column
.
key
else
:
column_name
=
text_type
(
c
)
# column_name must match column_name used in `get_list_columns`
# column_name must match column_name used in `get_list_columns`
result
[
column_name
]
=
column
result
[
column_name
]
=
column
...
@@ -517,7 +520,10 @@ class ModelView(BaseModelView):
...
@@ -517,7 +520,10 @@ class ModelView(BaseModelView):
column_name
=
text_type
(
c
)
column_name
=
text_type
(
c
)
else
:
else
:
# column is in same table, use only model attribute name
# column is in same table, use only model attribute name
column_name
=
column
.
key
if
hasattr
(
column
,
'key'
)
and
column
.
key
else
text_type
(
c
)
if
getattr
(
column
,
'key'
,
None
)
is
not
None
:
column_name
=
column
.
key
else
:
column_name
=
text_type
(
c
)
visible_name
=
self
.
get_column_name
(
column_name
)
visible_name
=
self
.
get_column_name
(
column_name
)
...
...
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