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
fe47ff72
Commit
fe47ff72
authored
Mar 21, 2013
by
Serge S. Koval
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more changes
parent
96f51f31
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
README.rst
examples/layout/README.rst
+1
-0
simple.py
examples/layout/simple.py
+5
-3
__init__.py
flask_admin/__init__.py
+1
-1
No files found.
examples/layout/README.rst
0 → 100644
View file @
fe47ff72
This example shows how to customize Flask-Admin layout and overall look and feel.
\ No newline at end of file
examples/layout/simple.py
View file @
fe47ff72
...
@@ -41,8 +41,10 @@ class CustomView(ModelView):
...
@@ -41,8 +41,10 @@ class CustomView(ModelView):
create_template
=
'create.html'
create_template
=
'create.html'
edit_template
=
'edit.html'
edit_template
=
'edit.html'
class
UserAdmin
(
CustomView
):
column_searchable_list
=
(
'name'
,)
column_searchable_list
=
(
'name'
,)
column_filters
=
(
'name'
,)
column_filters
=
(
'name'
,
'email'
)
# Flask views
# Flask views
...
@@ -52,11 +54,11 @@ def index():
...
@@ -52,11 +54,11 @@ def index():
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# Create admin
# Create admin
with custom base template
admin
=
admin
.
Admin
(
app
,
base_template
=
'layout.html'
)
admin
=
admin
.
Admin
(
app
,
base_template
=
'layout.html'
)
# Add views
# Add views
admin
.
add_view
(
CustomView
(
User
,
db
.
session
))
admin
.
add_view
(
UserAdmin
(
User
,
db
.
session
))
admin
.
add_view
(
CustomView
(
Page
,
db
.
session
))
admin
.
add_view
(
CustomView
(
Page
,
db
.
session
))
# Create DB
# Create DB
...
...
flask_admin/__init__.py
View file @
fe47ff72
__version__
=
'1.0.
4
'
__version__
=
'1.0.
5
'
__author__
=
'Serge S. Koval'
__author__
=
'Serge S. Koval'
__email__
=
'serge.koval+github@gmail.com'
__email__
=
'serge.koval+github@gmail.com'
...
...
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