-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into pillow-version
- Loading branch information
Showing
11 changed files
with
127 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
Security | ||
======== | ||
|
||
Responsible disclosure | ||
---------------------- | ||
|
||
We want to keep Flask-AppBuilder safe for everyone. If you've discovered a security vulnerability | ||
please report to [email protected]. | ||
|
||
Supported Authentication Types | ||
------------------------------ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
import logging | ||
|
||
from flask import Flask | ||
from flask_appbuilder import AppBuilder, SQLA | ||
|
||
logging.basicConfig(format="%(asctime)s:%(levelname)s:%(name)s:%(message)s") | ||
logging.getLogger().setLevel(logging.DEBUG) | ||
|
||
db = SQLA() | ||
appbuilder = AppBuilder() | ||
|
||
|
||
def create_app(config): | ||
app = Flask(__name__) | ||
with app.app_context(): | ||
app.config.from_object(config) | ||
db.init_app(app) | ||
appbuilder.init_app(app, db.session) | ||
from . import views # noqa | ||
|
||
db.create_all() | ||
appbuilder.post_init() | ||
views.fill_gender() | ||
return app | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import logging | ||
|
||
from flask import Flask | ||
from flask_appbuilder import AppBuilder, SQLA | ||
|
||
logging.basicConfig(format="%(asctime)s:%(levelname)s:%(name)s:%(message)s") | ||
logging.getLogger().setLevel(logging.DEBUG) | ||
|
||
|
||
def create_app(config): | ||
app = Flask(__name__) | ||
db = SQLA() | ||
appbuilder = AppBuilder() | ||
with app.app_context(): | ||
app.config.from_object(config) | ||
db.init_app(app) | ||
appbuilder.init_app(app, db.session) | ||
|
||
from .views import ContactModelView, GroupModelView, fill_gender | ||
|
||
appbuilder.add_view( | ||
ContactModelView, | ||
"List Contacts", | ||
icon="fa-envelope", | ||
category="Contacts", | ||
category_icon="fa-envelope", | ||
) | ||
|
||
appbuilder.add_view( | ||
GroupModelView, "List Groups", icon="fa-folder-open-o", category="Contacts" | ||
) | ||
|
||
db.create_all() | ||
appbuilder.post_init() | ||
fill_gender() | ||
return app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.