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
a935d7a1
Commit
a935d7a1
authored
Jul 04, 2015
by
Petrus J.v.Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final big edit for index page.
parent
e2371194
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
102 additions
and
127 deletions
+102
-127
advanced.rst
doc/advanced.rst
+43
-1
index.rst
doc/index.rst
+59
-126
No files found.
doc/advanced.rst
View file @
a935d7a1
...
@@ -35,7 +35,49 @@ And your classes could be made to use this template by setting the appropriate c
...
@@ -35,7 +35,49 @@ And your classes could be made to use this template by setting the appropriate c
The three available properties are simply called `list_template`, `create_template` and `edit_template`.
The three available properties are simply called `list_template`, `create_template` and `edit_template`.
If you want to use your own base template, then pass the name of the template to
the admin constructor during initialization::
admin = Admin(app, base_template='my_master.html')
Available Template Blocks
****************************
Flask-Admin defines one *base* template at `admin/master.html` that all the other admin templates are derived
from. This template is a proxy which points to `admin/base.html`, which defines
the following blocks:
============== ========================================================================
Block Name Description
============== ========================================================================
head_meta Page metadata in the header
title Page title
head_css Various CSS includes in the header
head Empty block in HTML head, in case you want to put something there
page_body Page layout
brand Logo in the menu bar
main_menu Main menu
menu_links Links menu
access_control Section to the right of the menu (can be used to add login/logout buttons)
messages Alerts and various messages
body Content (that's where your view will be displayed)
tail Empty area below content
============== ========================================================================
In addition to all of the blocks that are inherited from `admin/master.html`, the `admin/model/list.html` template
also contains the following blocks:
======================= ============================================
Block Name Description
======================= ============================================
model_menu_bar Menu bar
model_list_table Table container
list_header Table header row
list_row_actions_header Actions header
list_row Single row
list_row_actions Row action cell with edit/remove/etc buttons
empty_list_message Message that will be displayed if there are no models found
======================= ============================================
Replacing Individual Form Fields
Replacing Individual Form Fields
------------------------------------------
------------------------------------------
...
@@ -695,6 +737,6 @@ Usage Tips
...
@@ -695,6 +737,6 @@ Usage Tips
Initialisation: As an alternative to passing a Flask application object to the Admin constructor, you can also call the
Initialisation: As an alternative to passing a Flask application object to the Admin constructor, you can also call the
:meth:`~flask_admin.base.Admin.init_app` function, after the Admin instance has been initialized::
:meth:`~flask_admin.base.Admin.init_app` function, after the Admin instance has been initialized::
admin = Admin(name='
My App
', template_mode='bootstrap3')
admin = Admin(name='
microblog
', template_mode='bootstrap3')
# Add views here
# Add views here
admin.init_app(app)
admin.init_app(app)
\ No newline at end of file
doc/index.rst
View file @
a935d7a1
This diff is collapsed.
Click to expand it.
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