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
1f43bc89
Commit
1f43bc89
authored
Jun 14, 2015
by
Petrus J.v.Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updte 'simple' example to use Bootstrap 3.
parent
4a48fa42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
app.py
examples/simple/app.py
+1
-1
index.html
examples/simple/templates/admin/index.html
+17
-15
No files found.
examples/simple/app.py
View file @
1f43bc89
...
@@ -30,7 +30,7 @@ def index():
...
@@ -30,7 +30,7 @@ def index():
return
'<a href="/admin/">Click me to get to Admin!</a>'
return
'<a href="/admin/">Click me to get to Admin!</a>'
# Create admin interface
# Create admin interface
admin
=
admin
.
Admin
(
name
=
"Example: Simple Views"
)
admin
=
admin
.
Admin
(
name
=
"Example: Simple Views"
,
template_mode
=
'bootstrap3'
)
admin
.
add_view
(
MyAdminView
(
name
=
"view1"
,
category
=
'Test'
))
admin
.
add_view
(
MyAdminView
(
name
=
"view1"
,
category
=
'Test'
))
admin
.
add_view
(
AnotherAdminView
(
name
=
"view2"
,
category
=
'Test'
))
admin
.
add_view
(
AnotherAdminView
(
name
=
"view2"
,
category
=
'Test'
))
admin
.
init_app
(
app
)
admin
.
init_app
(
app
)
...
...
examples/simple/templates/admin/index.html
View file @
1f43bc89
{% extends 'admin/master.html' %}
{% extends 'admin/master.html' %}
{% block body %}
{% block body %}
{{ super() }}
{{ super() }}
<div
class=
"row"
>
<div
class=
"container"
>
<div
class=
"span10 offset1"
>
<div
class=
"row"
>
<div
class=
"col-sm-10 col-sm-offset-1"
>
<h1>
Flask-Admin example
</h1>
<h1>
Flask-Admin example
</h1>
<p
class=
"lead"
>
<p
class=
"lead"
>
Simple admin views, not related to models.
Simple admin views, not related to models.
...
@@ -14,7 +15,8 @@
...
@@ -14,7 +15,8 @@
<p>
<p>
By adding custom views to the admin interface, they become accessible through the
<em>
navbar
</em>
at the top.
By adding custom views to the admin interface, they become accessible through the
<em>
navbar
</em>
at the top.
</p>
</p>
<a
class=
"btn btn-primary"
href=
"/"
><i
class=
"icon-arrow-left icon-white"
></i>
Back
</a>
<a
class=
"btn btn-primary"
href=
"/"
><i
class=
"glyphicon glyphicon-chevron-left"
></i>
Back
</a>
</div>
</div>
</div>
</div>
</div>
{% endblock body %}
{% endblock body %}
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