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():
return '<a href="/admin/">Click me to get to Admin!</a>'
# 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(AnotherAdminView(name="view2", category='Test'))
admin.init_app(app)
......
{% extends 'admin/master.html' %}
{% block body %}
{{ super() }}
<div class="row">
<div class="span10 offset1">
<h1>Flask-Admin example</h1>
<p class="lead">
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
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>
<a class="btn btn-primary" href="/"><i class="icon-arrow-left icon-white"></i> Back</a>
</div>
<div class="container">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<h1>Flask-Admin example</h1>
<p class="lead">
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
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>
<a class="btn btn-primary" href="/"><i class="glyphicon glyphicon-chevron-left"></i> Back</a>
</div>
</div>
</div>
{% 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