Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
015ea597
Commit
015ea597
authored
Jun 14, 2015
by
Petrus J.v.Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 'formswq' example to use Bootstrap 3. Add missing 'pillow' requirement.
parent
1286f55a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
13 deletions
+18
-13
app.py
examples/forms/app.py
+1
-1
requirements.txt
examples/forms/requirements.txt
+1
-0
index.html
examples/forms/templates/admin/index.html
+16
-12
No files found.
examples/forms/app.py
View file @
015ea597
...
@@ -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
))
...
...
examples/forms/requirements.txt
View file @
015ea597
Flask
Flask
Flask-Admin
Flask-Admin
Flask-SQLAlchemy
Flask-SQLAlchemy
pillow
\ No newline at end of file
examples/forms/templates/admin/index.html
View file @
015ea597
{% 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment