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">
<h1>Flask-Admin example</h1> <div class="col-sm-10 col-sm-offset-1">
<p class="lead"> <h1>Flask-Admin example</h1>
Simple admin views, not related to models. <p class="lead">
</p> Simple admin views, not related to models.
<p> </p>
This example shows how to add your own views to the admin interface. The views do not have to be associated <p>
to any of your models, and you can fill them with whatever content you want. This example shows how to add your own views to the admin interface. The views do not have to be associated
</p> to any of your models, and you can fill them with whatever content you want.
<p> </p>
By adding custom views to the admin interface, they become accessible through the <em>navbar</em> at the top. <p>
</p> By adding custom views to the admin interface, they become accessible through the <em>navbar</em> at the top.
<a class="btn btn-primary" href="/"><i class="icon-arrow-left icon-white"></i> Back</a> </p>
</div> <a class="btn btn-primary" href="/"><i class="glyphicon glyphicon-chevron-left"></i> Back</a>
</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