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
ac9a1870
Commit
ac9a1870
authored
Sep 26, 2018
by
PJ Janse van Rensburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bootstrap4 in examples
parent
bebc77c9
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
9 additions
and
9 deletions
+9
-9
app.py
examples/auth/app.py
+1
-1
app.py
examples/forms/app.py
+1
-1
app.py
examples/geo_alchemy/app.py
+1
-1
app.py
examples/simple/app.py
+1
-1
app.py
examples/sqla-association_proxy/app.py
+1
-1
app.py
examples/sqla-filter-selectable/app.py
+1
-1
app.py
examples/sqla-hybrid_property/app.py
+1
-1
app.py
examples/sqla/app.py
+1
-1
app2.py
examples/sqla/app2.py
+1
-1
No files found.
examples/auth/app.py
View file @
ac9a1870
...
@@ -86,7 +86,7 @@ admin = flask_admin.Admin(
...
@@ -86,7 +86,7 @@ admin = flask_admin.Admin(
app
,
app
,
'Example: Auth'
,
'Example: Auth'
,
base_template
=
'my_master.html'
,
base_template
=
'my_master.html'
,
template_mode
=
'bootstrap
3
'
,
template_mode
=
'bootstrap
4
'
,
)
)
# Add model views
# Add model views
...
...
examples/forms/app.py
View file @
ac9a1870
...
@@ -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'
,
template_mode
=
'bootstrap
3
'
)
admin
=
Admin
(
app
,
'Example: Forms'
,
template_mode
=
'bootstrap
4
'
)
# Add views
# Add views
admin
.
add_view
(
FileView
(
File
,
db
.
session
))
admin
.
add_view
(
FileView
(
File
,
db
.
session
))
...
...
examples/geo_alchemy/app.py
View file @
ac9a1870
...
@@ -54,7 +54,7 @@ def index():
...
@@ -54,7 +54,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
.
Admin
(
app
,
name
=
'Example: GeoAlchemy'
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
app
,
name
=
'Example: GeoAlchemy'
,
template_mode
=
'bootstrap
4
'
)
# Add views
# Add views
admin
.
add_view
(
ModelView
(
Point
,
db
.
session
,
category
=
'Points'
))
admin
.
add_view
(
ModelView
(
Point
,
db
.
session
,
category
=
'Points'
))
...
...
examples/simple/app.py
View file @
ac9a1870
...
@@ -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"
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
name
=
"Example: Simple Views"
,
template_mode
=
'bootstrap
4
'
)
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
)
...
...
examples/sqla-association_proxy/app.py
View file @
ac9a1870
...
@@ -87,7 +87,7 @@ class KeywordAdmin(sqla.ModelView):
...
@@ -87,7 +87,7 @@ class KeywordAdmin(sqla.ModelView):
# Create admin
# Create admin
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy Association Proxy'
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy Association Proxy'
,
template_mode
=
'bootstrap
4
'
)
admin
.
add_view
(
UserAdmin
(
User
,
db
.
session
))
admin
.
add_view
(
UserAdmin
(
User
,
db
.
session
))
admin
.
add_view
(
KeywordAdmin
(
Keyword
,
db
.
session
))
admin
.
add_view
(
KeywordAdmin
(
Keyword
,
db
.
session
))
...
...
examples/sqla-filter-selectable/app.py
View file @
ac9a1870
...
@@ -68,7 +68,7 @@ class PersonAdmin(sqla.ModelView):
...
@@ -68,7 +68,7 @@ class PersonAdmin(sqla.ModelView):
# Create admin
# Create admin
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy - Filtered Form Selectable'
,
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy - Filtered Form Selectable'
,
template_mode
=
'bootstrap
3
'
)
template_mode
=
'bootstrap
4
'
)
admin
.
add_view
(
PersonAdmin
(
Person
,
db
.
session
))
admin
.
add_view
(
PersonAdmin
(
Person
,
db
.
session
))
admin
.
add_view
(
sqla
.
ModelView
(
Pet
,
db
.
session
))
admin
.
add_view
(
sqla
.
ModelView
(
Pet
,
db
.
session
))
...
...
examples/sqla-hybrid_property/app.py
View file @
ac9a1870
...
@@ -45,7 +45,7 @@ class ScreenAdmin(sqla.ModelView):
...
@@ -45,7 +45,7 @@ class ScreenAdmin(sqla.ModelView):
# Create admin
# Create admin
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy2'
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy2'
,
template_mode
=
'bootstrap
4
'
)
admin
.
add_view
(
ScreenAdmin
(
Screen
,
db
.
session
))
admin
.
add_view
(
ScreenAdmin
(
Screen
,
db
.
session
))
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
examples/sqla/app.py
View file @
ac9a1870
...
@@ -144,7 +144,7 @@ class TreeView(sqla.ModelView):
...
@@ -144,7 +144,7 @@ class TreeView(sqla.ModelView):
# Create admin
# Create admin
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy'
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy'
,
template_mode
=
'bootstrap
4
'
)
# Add views
# Add views
admin
.
add_view
(
UserAdmin
(
User
,
db
.
session
))
admin
.
add_view
(
UserAdmin
(
User
,
db
.
session
))
...
...
examples/sqla/app2.py
View file @
ac9a1870
...
@@ -50,7 +50,7 @@ class TyreAdmin(sqla.ModelView):
...
@@ -50,7 +50,7 @@ class TyreAdmin(sqla.ModelView):
form_columns
=
[
'car'
,
'tyre_id'
,
'desc'
]
form_columns
=
[
'car'
,
'tyre_id'
,
'desc'
]
# Create admin
# Create admin
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy2'
,
template_mode
=
'bootstrap
3
'
)
admin
=
admin
.
Admin
(
app
,
name
=
'Example: SQLAlchemy2'
,
template_mode
=
'bootstrap
4
'
)
admin
.
add_view
(
CarAdmin
(
Car
,
db
.
session
))
admin
.
add_view
(
CarAdmin
(
Car
,
db
.
session
))
admin
.
add_view
(
TyreAdmin
(
Tyre
,
db
.
session
))
admin
.
add_view
(
TyreAdmin
(
Tyre
,
db
.
session
))
...
...
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