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
a8495930
Commit
a8495930
authored
Sep 27, 2014
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Plain Diff
Merged with master
parents
83ec5be7
6150104f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
4 deletions
+25
-4
base.py
flask_admin/base.py
+1
-0
view.py
flask_admin/contrib/sqla/view.py
+2
-2
list.html
flask_admin/templates/bootstrap3/admin/file/list.html
+1
-1
inline_list_base.html
...in/templates/bootstrap3/admin/model/inline_list_base.html
+1
-1
test_basic.py
flask_admin/tests/sqlamodel/test_basic.py
+20
-0
No files found.
flask_admin/base.py
View file @
a8495930
...
@@ -111,6 +111,7 @@ class BaseView(with_metaclass(AdminViewMeta, BaseViewClass)):
...
@@ -111,6 +111,7 @@ class BaseView(with_metaclass(AdminViewMeta, BaseViewClass)):
Derive from this class to implement your administrative interface piece. For example::
Derive from this class to implement your administrative interface piece. For example::
from flask.ext.admin import BaseView, expose
class MyView(BaseView):
class MyView(BaseView):
@expose('/')
@expose('/')
def index(self):
def index(self):
...
...
flask_admin/contrib/sqla/view.py
View file @
a8495930
...
@@ -749,8 +749,8 @@ class ModelView(BaseModelView):
...
@@ -749,8 +749,8 @@ class ModelView(BaseModelView):
if
self
.
_search_joins
:
if
self
.
_search_joins
:
for
table
in
self
.
_search_joins
:
for
table
in
self
.
_search_joins
:
if
table
.
name
not
in
joins
:
if
table
.
name
not
in
joins
:
query
=
query
.
join
(
table
)
query
=
query
.
outer
join
(
table
)
count_query
=
count_query
.
join
(
table
)
count_query
=
count_query
.
outer
join
(
table
)
joins
.
add
(
table
.
name
)
joins
.
add
(
table
.
name
)
...
...
flask_admin/templates/bootstrap3/admin/file/list.html
View file @
a8495930
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
<input
type=
"hidden"
name=
"path"
value=
"{{ path }}"
></input>
<input
type=
"hidden"
name=
"path"
value=
"{{ path }}"
></input>
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\' recursively?', name=name) }}')"
>
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\' recursively?', name=name) }}')"
>
<i
class=
"icon-remove"
></i>
<i
class=
"
glyphicon glyph
icon-remove"
></i>
</button>
</button>
</form>
</form>
{% endif %}
{% endif %}
...
...
flask_admin/templates/bootstrap3/admin/model/inline_list_base.html
View file @
a8495930
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</div>
</div>
{% else %}
{% else %}
<div
class=
"inline-field-control"
>
<div
class=
"inline-field-control"
>
<a
href=
"javascript:void(0)"
class=
"inline-remove-field"
><i
class=
"icon-remove"
></i></a>
<a
href=
"javascript:void(0)"
class=
"inline-remove-field"
><i
class=
"
glyphicon glyph
icon-remove"
></i></a>
</div>
</div>
{% endif %}
{% endif %}
{%- endif -%}
{%- endif -%}
...
...
flask_admin/tests/sqlamodel/test_basic.py
View file @
a8495930
...
@@ -246,6 +246,26 @@ def test_complex_searchable_list():
...
@@ -246,6 +246,26 @@ def test_complex_searchable_list():
ok_
(
'model3'
not
in
data
)
ok_
(
'model3'
not
in
data
)
def
test_complex_searchable_list_missing_children
():
app
,
db
,
admin
=
setup
()
Model1
,
Model2
=
create_models
(
db
)
view
=
CustomModelView
(
Model1
,
db
.
session
,
column_searchable_list
=
[
'test1'
,
'model2.string_field'
])
admin
.
add_view
(
view
)
db
.
session
.
add
(
Model1
(
'magic string'
))
db
.
session
.
commit
()
client
=
app
.
test_client
()
rv
=
client
.
get
(
'/admin/model1/?search=magic'
)
data
=
rv
.
data
.
decode
(
'utf-8'
)
ok_
(
'magic string'
in
data
)
def
test_column_filters
():
def
test_column_filters
():
app
,
db
,
admin
=
setup
()
app
,
db
,
admin
=
setup
()
...
...
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