Commit 015ea597 authored by Petrus J.v.Rensburg's avatar Petrus J.v.Rensburg

Update 'formswq' example to use Bootstrap 3. Add missing 'pillow' requirement.

parent 1286f55a
...@@ -157,7 +157,7 @@ def index(): ...@@ -157,7 +157,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 # Create admin
admin = Admin(app, 'Example: Forms') admin = Admin(app, 'Example: Forms', template_mode='bootstrap3')
# Add views # Add views
admin.add_view(FileView(File, db.session)) admin.add_view(FileView(File, db.session))
......
Flask Flask
Flask-Admin Flask-Admin
Flask-SQLAlchemy Flask-SQLAlchemy
pillow
\ No newline at end of file
{% extends 'admin/master.html' %} {% extends 'admin/master.html' %}
{% block body %} {% block body %}
{{ super() }} {{ super() }}
<div class="row-fluid"> <div class="container">
<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">
Custom forms Custom forms
...@@ -12,6 +14,8 @@ ...@@ -12,6 +14,8 @@
<p> <p>
It also demonstrates general file handling as well as the handling of image files specifically. It also demonstrates general file handling as well as the handling of image files specifically.
</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>
{% endblock body %} {% endblock body %}
\ No newline at end of file
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