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
4f329c23
Commit
4f329c23
authored
May 14, 2019
by
momentxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootswatch theme's example
parent
bf26d397
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
app.py
examples/bootstrap4/app.py
+2
-1
No files found.
examples/bootstrap4/app.py
View file @
4f329c23
...
@@ -4,7 +4,6 @@ from flask import Flask
...
@@ -4,7 +4,6 @@ from flask import Flask
from
flask_sqlalchemy
import
SQLAlchemy
from
flask_sqlalchemy
import
SQLAlchemy
import
flask_admin
as
admin
import
flask_admin
as
admin
print
(
admin
.
__version__
)
from
flask_admin.contrib.sqla
import
ModelView
from
flask_admin.contrib.sqla
import
ModelView
...
@@ -13,6 +12,7 @@ app = Flask(__name__)
...
@@ -13,6 +12,7 @@ app = Flask(__name__)
# Create dummy secrey key so we can use sessions
# Create dummy secrey key so we can use sessions
app
.
config
[
'SECRET_KEY'
]
=
'123456790'
app
.
config
[
'SECRET_KEY'
]
=
'123456790'
app
.
config
[
'FLASK_ADMIN_SWATCH'
]
=
'Flatly'
# Create in-memory database
# Create in-memory database
app
.
config
[
'DATABASE_FILE'
]
=
'sample_db.sqlite'
app
.
config
[
'DATABASE_FILE'
]
=
'sample_db.sqlite'
...
@@ -138,6 +138,7 @@ def build_sample_db():
...
@@ -138,6 +138,7 @@ def build_sample_db():
db
.
session
.
commit
()
db
.
session
.
commit
()
return
return
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# Build a sample db on the fly, if one does not exist yet.
# Build a sample db on the fly, if one does not exist yet.
...
...
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