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
dc78889c
Commit
dc78889c
authored
Dec 18, 2015
by
Paul Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent assuming 'id' is primary key for details view
parent
3b5d929a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
5 deletions
+4
-5
base.py
flask_admin/model/base.py
+0
-1
details.html
flask_admin/templates/bootstrap2/admin/model/details.html
+1
-1
edit.html
flask_admin/templates/bootstrap2/admin/model/edit.html
+1
-1
details.html
flask_admin/templates/bootstrap3/admin/model/details.html
+1
-1
edit.html
flask_admin/templates/bootstrap3/admin/model/edit.html
+1
-1
No files found.
flask_admin/model/base.py
View file @
dc78889c
...
@@ -1927,7 +1927,6 @@ class BaseModelView(BaseView, ActionsMixin):
...
@@ -1927,7 +1927,6 @@ class BaseModelView(BaseView, ActionsMixin):
model
=
model
,
model
=
model
,
details_columns
=
self
.
_details_columns
,
details_columns
=
self
.
_details_columns
,
get_value
=
self
.
get_list_value
,
get_value
=
self
.
get_list_value
,
get_pk_value
=
self
.
get_pk_value
,
return_url
=
return_url
)
return_url
=
return_url
)
@
expose
(
'/delete/'
,
methods
=
(
'POST'
,))
@
expose
(
'/delete/'
,
methods
=
(
'POST'
,))
...
...
flask_admin/templates/bootstrap2/admin/model/details.html
View file @
dc78889c
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
{%- endif -%}
{%- endif -%}
{%- if admin_view.can_edit -%}
{%- if admin_view.can_edit -%}
<li>
<li>
<a
href=
"{{ get_url('.edit_view', id=
get_pk_value(model
), url=return_url) }}"
>
{{ _gettext('Edit') }}
</a>
<a
href=
"{{ get_url('.edit_view', id=
request.args.get('id'
), url=return_url) }}"
>
{{ _gettext('Edit') }}
</a>
</li>
</li>
{%- endif -%}
{%- endif -%}
<li
class=
"active"
>
<li
class=
"active"
>
...
...
flask_admin/templates/bootstrap2/admin/model/edit.html
View file @
dc78889c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</li>
</li>
{%- if admin_view.can_view_details -%}
{%- if admin_view.can_view_details -%}
<li>
<li>
<a
href=
"{{ get_url('.details_view', id=
model.id
, url=return_url) }}"
>
{{ _gettext('Details') }}
</a>
<a
href=
"{{ get_url('.details_view', id=
request.args.get('id')
, url=return_url) }}"
>
{{ _gettext('Details') }}
</a>
</li>
</li>
{%- endif -%}
{%- endif -%}
</ul>
</ul>
...
...
flask_admin/templates/bootstrap3/admin/model/details.html
View file @
dc78889c
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
{%- endif -%}
{%- endif -%}
{%- if admin_view.can_edit -%}
{%- if admin_view.can_edit -%}
<li>
<li>
<a
href=
"{{ get_url('.edit_view', id=
get_pk_value(model
), url=return_url) }}"
>
{{ _gettext('Edit') }}
</a>
<a
href=
"{{ get_url('.edit_view', id=
request.args.get('id'
), url=return_url) }}"
>
{{ _gettext('Edit') }}
</a>
</li>
</li>
{%- endif -%}
{%- endif -%}
<li
class=
"active"
>
<li
class=
"active"
>
...
...
flask_admin/templates/bootstrap3/admin/model/edit.html
View file @
dc78889c
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
</li>
</li>
{%- if admin_view.can_view_details -%}
{%- if admin_view.can_view_details -%}
<li>
<li>
<a
href=
"{{ get_url('.details_view', id=
model.id
, url=return_url) }}"
>
{{ _gettext('Details') }}
</a>
<a
href=
"{{ get_url('.details_view', id=
request.args.get('id')
, url=return_url) }}"
>
{{ _gettext('Details') }}
</a>
</li>
</li>
{%- endif -%}
{%- endif -%}
</ul>
</ul>
...
...
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