mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
108536234: created users and roles data and domain model.
You will need to run the /scripts/bootstrap.sh to create the database for test and the app.
This commit is contained in:
73
app.py
73
app.py
@@ -1,82 +1,17 @@
|
||||
import os
|
||||
from flask.ext import assets
|
||||
from flask.ext.script import Manager, Server
|
||||
from flask_migrate import Migrate, MigrateCommand
|
||||
from webassets.filter import get_filter
|
||||
from app import create_app
|
||||
from app import create_app, db
|
||||
|
||||
|
||||
application = create_app(os.getenv('NOTIFICATIONS_ADMIN_ENVIRONMENT') or 'development')
|
||||
manager = Manager(application)
|
||||
port = int(os.environ.get('PORT', 6012))
|
||||
manager.add_command("runserver", Server(host='0.0.0.0', port=port))
|
||||
|
||||
env = assets.Environment(application)
|
||||
|
||||
# Tell flask-assets where to look for our sass files.
|
||||
env.load_path = [
|
||||
os.path.join(os.path.dirname(__file__), 'app/assets/stylesheets'),
|
||||
os.path.join(os.path.dirname(__file__), 'app/assets'),
|
||||
os.path.join(os.path.dirname(__file__), 'app/assets/stylesheets/stylesheets/govuk_frontend_toolkit'),
|
||||
os.path.join(os.path.dirname(__file__), 'app/assets/stylesheets/govuk_template')
|
||||
|
||||
]
|
||||
|
||||
|
||||
scss = get_filter('scss', as_output=True)
|
||||
|
||||
env.register(
|
||||
'css_all',
|
||||
assets.Bundle(
|
||||
'main.scss',
|
||||
filters='scss',
|
||||
output='css_all.css'
|
||||
)
|
||||
)
|
||||
|
||||
env.register(
|
||||
'css_govuk-template',
|
||||
assets.Bundle(
|
||||
'govuk_template/govuk-template.scss',
|
||||
filters='scss',
|
||||
output='stylesheets/govuk-template.css'
|
||||
)
|
||||
)
|
||||
|
||||
env.register(
|
||||
'css_govuk-template-ie6',
|
||||
assets.Bundle(
|
||||
'govuk_template/govuk-template-ie6.scss',
|
||||
filters='scss',
|
||||
output='stylesheets/govuk-template-ie6.css'
|
||||
)
|
||||
)
|
||||
|
||||
env.register(
|
||||
'css_govuk-template-ie7',
|
||||
assets.Bundle(
|
||||
'govuk_template/govuk-template-ie7.scss',
|
||||
filters='scss',
|
||||
output='stylesheets/govuk-template-ie7.css'
|
||||
)
|
||||
)
|
||||
|
||||
env.register(
|
||||
'css_govuk-template-ie8',
|
||||
assets.Bundle(
|
||||
'govuk_template/govuk-template-ie8.scss',
|
||||
filters='scss',
|
||||
output='stylesheets/govuk-template-ie8.css'
|
||||
)
|
||||
)
|
||||
|
||||
env.register(
|
||||
'css_govuk-template-print',
|
||||
assets.Bundle(
|
||||
'govuk_template/govuk-template-print.scss',
|
||||
filters='scss',
|
||||
output='stylesheets/govuk-template-print.css'
|
||||
)
|
||||
)
|
||||
migrate = Migrate(application, db)
|
||||
manager.add_command('db', MigrateCommand)
|
||||
|
||||
|
||||
@manager.command
|
||||
|
||||
Reference in New Issue
Block a user