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">
<h1>Flask-Admin example</h1> <div class="row">
<p class="lead"> <div class="col-sm-10 col-sm-offset-1">
Custom forms <h1>Flask-Admin example</h1>
</p> <p class="lead">
<p> Custom forms
This example shows how you can define your own custom forms by using form rendering rules. </p>
</p> <p>
<p> This example shows how you can define your own custom forms by using form rendering rules.
It also demonstrates general file handling as well as the handling of image files specifically. </p>
</p> <p>
<a class="btn btn-primary" href="/"><i class="icon-arrow-left icon-white"></i> Back</a> It also demonstrates general file handling as well as the handling of image files specifically.
</p>
<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