Commit 5efa146a authored by PJ Janse van Rensburg's avatar PJ Janse van Rensburg

Update 'layout' example for bootstrap3.

parent 2965f25e
...@@ -58,7 +58,7 @@ def index(): ...@@ -58,7 +58,7 @@ def index():
# Create admin with custom base template # Create admin with custom base template
admin = admin.Admin(app, 'Example: Layout', base_template='layout.html') admin = admin.Admin(app, 'Example: Layout', base_template='layout.html', template_mode='bootstrap3')
# Add views # Add views
admin.add_view(UserAdmin(User, db.session)) admin.add_view(UserAdmin(User, db.session))
......
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
<p> <p>
This is done by overriding some of the built-in templates. This is done by overriding some of the built-in templates.
</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-arrow-left"></i> Back</a>
</div> </div>
{% endblock body %} {% endblock body %}
\ No newline at end of file
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
{% endblock %} {% endblock %}
{% block page_body %} {% block page_body %}
<div class="container"> <div class="container-fluid">
<div class="row"> <div class="row">
<div class="span2"> <div class="col-sm-3">
<ul class="nav nav-pills nav-stacked"> <ul class="nav nav-pills nav-stacked">
{{ layout.menu() }} {{ layout.menu() }}
{{ layout.menu_links() }} {{ layout.menu_links() }}
</ul> </ul>
</div> </div>
<div class="span10"> <div class="col-sm-9">
<div id="content"> <div id="content">
{% block brand %} {% block brand %}
<h2 id="brand">{{ admin_view.name|capitalize }}</h2> <h2 id="brand">{{ admin_view.name|capitalize }}</h2>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment