Commit 1f43bc89 authored by Petrus J.v.Rensburg's avatar Petrus J.v.Rensburg

Updte 'simple' example to use Bootstrap 3.

parent 4a48fa42
...@@ -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)
......
{% 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 %}
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