mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Start to create views
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
from flask import Flask
|
||||
|
||||
|
||||
def create_app():
|
||||
application = Flask(__name__)
|
||||
|
||||
# application.config['NOTIFY_API_ENVIRONMENT'] = config_name
|
||||
# application.config.from_object(configs[config_name])
|
||||
from .main import main as main_blueprint
|
||||
application.register_blueprint(main_blueprint)
|
||||
|
||||
return application
|
||||
|
||||
|
||||
6
app/main/__init__.py
Normal file
6
app/main/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from flask import Blueprint
|
||||
|
||||
main = Blueprint('main', __name__)
|
||||
|
||||
|
||||
from .views import index
|
||||
0
app/main/views/__init__.py
Normal file
0
app/main/views/__init__.py
Normal file
7
app/main/views/index.py
Normal file
7
app/main/views/index.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from .. import main
|
||||
|
||||
|
||||
@main.route('/index')
|
||||
def index():
|
||||
return 'Hello from notifications-admin'
|
||||
|
||||
Reference in New Issue
Block a user