Beispiel #1
0
def get_app():
    # app = Flask(__name__)
    app = Flask("pyfem")
    app.config.from_object(Config)

    # set environment PYFEM_SETTINGS=testing_settings to automatically use a -test version of db
    if os.environ.get("PYFEM_SETTINGS"):
        if os.environ["PYFEM_SETTINGS"] == "testing_settings":
            app.config["MONGODB_SETTINGS"] = dict(db=app.config["MONGO_DBNAME"] + "-test")

    app.secret_key = app.config["SECRET_KEY"]

    app.me = MongoEngine(app)
    app.pymongo = _get_db()

    # app.jinja_env.add_extension('util.Markdown2Extension')
    # app.jinja_env.filters['slugify'] = slugify
    # app.jinja_env.filters['timesince'] = timesince
    # app.jinja_env.filters['timeuntil'] = timeuntil
    # app.jinja_env.filters['jsonencode'] = jsonencode
    # app.jinja_env.globals['newrelic_head'] = newrelic_head
    # app.jinja_env.globals['newrelic_foot'] = newrelic_foot

    # if not app.config.get('TEMPLATE_DEBUG', True):
    #     compiled_templates = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'compiled_templates')
    #     compiled_files = path.path(compiled_templates).files()
    #     if len(compiled_files) <= 1:
    #         app.jinja_env.compile_templates(compiled_templates, zip=None, py_compile=True)
    #     app.jinja_env.loader = ModuleLoader(compiled_templates)

    configure_logging(app)
    return app
Beispiel #2
0
def create_app(config_name):
    app = Flask(__name__)
    app.config.from_object(config[config_name])
    try:
        load_dotenv(".env")
        app.config.update(parse_dotenv(".env"))
    except TypeError:
        print("Error parsing .env")
    app.config["MONGODB_SETTINGS"] = {"db": app.config["MONGO_DBNAME"], "host": app.config["MONGO_URI"]}
    config[config_name].init_app(app)
    bootstrap.init_app(app)
    mail.init_app(app)
    moment.init_app(app)
    db.init_app(app)
    login_manager.init_app(app)

    from main import main as main_blueprint

    app.register_blueprint(main_blueprint)

    from .auth import auth as auth_blueprint

    app.register_blueprint(auth_blueprint, url_prefix="/auth")
    # attach routes and custom error pages here
    return app
Beispiel #3
0
def create_app(config=None):
    """Creates the app."""
    # Initialize the app
    app = Flask("Kepavi")

    # Use the default config and override it afterwards
    app.config.from_object("kepavi.configs.default.DefaultConfig")
    # Update the config
    app.config.from_object(config)
    # try to update the config via the environment variable
    app.config.from_envvar("FLASKBB_SETTINGS", silent=True)

    # github extensions, TODO put that into configs directory
    app.config["GITHUB_CLIENT_ID"] = "ed057c9e07f531f0fdb6"
    app.config["GITHUB_CLIENT_SECRET"] = os.environ.get("GITHUB_CLIENT_SECRET") or GITHUB_CLIENT_SECRET

    app.config["MONGODB_SETTINGS"] = {"db": "biomodels", "host": "mongodb://localhost:27017/biomodels"}

    configure_blueprints(app)

    configure_extensions(app)

    configure_template_filters(app)

    # configure_context_processors(app)

    # configure_before_handlers(app)

    configure_errorhandlers(app)

    # configure_logging(app)

    app.logger.addHandler(logging.StreamHandler(sys.stdout))
    app.logger.setLevel(logging.INFO)
    return app
Beispiel #4
0
def setup():
    app = Flask(__name__)
    app.config["SECRET_KEY"] = "1"
    app.config["CSRF_ENABLED"] = False
    app.config["MONGODB_SETTINGS"] = {"DB": "tests"}

    db = MongoEngine()
    db.init_app(app)

    admin = Admin(app)

    return app, db, admin
Beispiel #5
0
def create_app(config=None):
    if not config:
        config = {
            "db": "testproject",
            "host": "127.0.0.1",
            "port": 27017,
            "read_preference": read_preferences.ReadPreference.PRIMARY,
        }

    app = Flask(__name__)
    app.config["MONGODB_SETTINGS"] = config

    db.init_app(app)

    from api.views import api as api_blueprint

    app.register_blueprint(api_blueprint)

    return app
Beispiel #6
0
def create_app():
    app = Flask(__name__)
    app.config["MONGODB_SETTINGS"] = {"DB": "MMCS_survey"}
    app.config["SECRET_KEY"] = ""

    from .main import main as main_blueprint

    app.register_blueprint(main_blueprint)

    from .survey import survey as survey_blueprint

    app.register_blueprint(survey_blueprint, url_prefix="/survey")

    from .auth import auth as auth_blueprint

    app.register_blueprint(auth_blueprint, url_prefix="/auth")

    from .maintaining import maintaining as maintaining_blueprint

    app.register_blueprint(maintaining_blueprint, url_prefix="/maintaining")

    return app
Beispiel #7
0
def create_app(config=None, environment=None):
    app = Flask(__name__)

    # TODO: Get this from a config file
    app.config["MONGODB_SETTINGS"] = {"db": "eatdb"}
    app.config[
        "SECRET_KEY"
    ] = "\x1a\xb1\x9d\x1d\xf2\x01\xa1X\xb8g\xed\x1c\xb3\x0f+s\xbce\xf6\x92\x83'\xf2\xbc\x96\xc6\x18\x03`\xc0\x0c("
    app.config["IV"] = "\xe7\x9d\xc7\xbd\x12l\x88\xc7\xe9D\x93!\xa2B\xed\x91"
    app.config.from_pyfile("settings.cfg", silent=True)
    app.session_interface = MongoSessionInterface(**(app.config["MONGODB_SETTINGS"]))

    with app.app_context():
        from models import db

        db.init_app(app)

        login_manager = LoginManager()

        @login_manager.user_loader
        def load_user(id):
            if id in (None, "None"):
                return None
            try:
                from models.user import User

                return User.objects(id=id).first()
            except:
                return None

        login_manager.init_app(app)

        from views import register_routes as register_views

        register_views(app)

    return app
Beispiel #8
0
from wtforms import StringField, SubmitField
from wtforms.validators import Required

from dotenv import parse_dotenv, load_dotenv

##################
#    Config      #
##################
app = Flask(__name__)
try:
    load_dotenv(".env")
    app.config.update(parse_dotenv(".env"))
except TypeError:
    print("Error parsing .env")

app.config["MONGODB_SETTINGS"] = {"db": app.config["MONGO_DBNAME"], "host": app.config["MONGO_URI"]}

###############
#    Init     #
###############

# Actually connects to the DB
def connect_db():
    connection = connect(
        app.config["MONGO_DBNAME"],
        username=app.config["MONGO_USERNAME"],
        password=app.config["MONGO_PASSWORD"],
        host=app.config["MONGO_URI"],
    )
    print("Connected to DB.")
    return connection
Beispiel #9
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine
from os import environ as env

app = Flask(__name__, static_folder="static", static_url_path="")

# Load config.
if env.get("HIVE_TESTING"):
    app.config.from_object("config")
    app.config["MONGODB_SETTINGS"] = {"DB": "hive_testing"}
elif env.get("HEROKU"):
    app.config.from_object("config_heroku")
else:
    app.config.from_object("config")

# Setup the database.
db = MongoEngine(app)

from app import routes, models
Beispiel #10
0
from flask import Flask, render_template
from flask.ext.mongoengine import MongoEngine


app = Flask(__name__)

# Configure the database
app.config["MONGODB_SETTINGS"] = {"db": "namethatbird", "host": "localhost", "port": 10036}
with app.app_context():
    db = MongoEngine(app)


@app.route("/", methods=["GET"])
def hello_world():
    return render_template("index.html")
    # return 'Hello World!'


if __name__ == "__main__":
    app.run(debug=True)
Beispiel #11
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine


app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "nfc_health_db"}
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

db = MongoEngine(app)


def register_blueprints(app):
    # Prevents circular imports
    from nfc_health.views import bp

    app.register_blueprint(bp)


register_blueprints(app)


if __name__ == "__main__":
    app.run()
Beispiel #12
0
import os
from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "uclaapi_test"}
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

db = MongoEngine(app)


@app.route("/")
def home():
    return "hello werld"


@app.route("/api/v1/classes")
def get_class_list():
    return "classes"


@app.route("/api/v1/classes/<int:class_id>")
def get_class_info(class_id):
    return "class info"


@app.route("/api/v1/textbooks")
def get_book_list():
    return "books"

Beispiel #13
0
app.config["SECRET_KEY"] = "LSKFJDSLf84wi7rleIFdso8fsL9F87SDAOIFUSOH87FS70Q03958734LKdllkjdsflskjf"

###################
#    DB Config    #
###################

app.config["MONGO_URI"] = "mongodb://mikachama:Haruka10@ds033419.mongolab.com:33419/inventory"
app.config["MONGODB_HOST"] = "ds033419.mongolab.com"
app.config["MONGODB_PORT"] = 33419
app.config["MONGO_DBNAME"] = "inventory"
app.config["MONGODB_USERNAME"] = "mikachama"
app.config["MONGODB_PASSWORD"] = "Haruka10"
app.config["ADMIN_EMAIL"] = "admin@admin.com"
app.config["ADMIN_PASS"] = "testerpassword"
app.config["MONGODB_SETTINGS"] = {
    "db": "inventory",
    "host": "mongodb://mikachama:Haruka10@ds033419.mongolab.com:33419/inventory",
}


###############
#    Init     #
###############

# Actually connects to the DB
def connect_db():
    connection = connect(
        app.config["MONGO_DBNAME"],
        username=app.config["MONGO_USERNAME"],
        password=app.config["MONGO_PASSWORD"],
        host=app.config["MONGO_URI"],
    )
Beispiel #14
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "blog"}
app.config["SECRET_KEY"] = "p00py"

db = MongoEngine(app)


def register_blueprints(app):
    # Prevents circular imports
    from blog.views import posts
    from blog.admin import admin

    app.register_blueprint(posts)
    app.register_blueprint(admin)


register_blueprints(app)

if __name__ == "__main__":
    app.run()
Beispiel #15
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine
from flask import render_template, url_for, redirect


from flask import make_response
from functools import update_wrapper

app = Flask(__name__)

# app.config.from_object('parkyou.default_settings')
# $ export PARKYOU_SETTINGS=conf/settings.cfg
app.config.from_envvar("PARKYOU_SETTINGS")


app.config["MONGODB_SETTINGS"] = {"DB": "parku"}


db = MongoEngine(app)

from parkyou.data import dbops
import json

# The center of the map will be Times Square
TS_LATITUDE = 40.759060
TS_LONGNITUDE = -73.984776
RADIUS = 1  # not sure what the unit on this is


def get_polylines():
    polylines = []
from flask import Flask
from flask_mongoengine import MongoEngine, MongoEngineSessionInterface
from FileDownloadMonitor import FileDownloadMonitor

app = Flask(__name__, static_url_path="")
app.config["MONGODB_SETTINGS"] = {"DB": "my_bestperformancehit"}
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

db = MongoEngine(app)
app.session_interface = MongoEngineSessionInterface(db)

if __name__ == "__main__":
    app.run()


def register_blueprints(app):
    # Prevents circular imports
    from views import file_providers

    app.register_blueprint(file_providers)


register_blueprints(app)
Beispiel #17
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)

app.config["DEBUG"] = True
app.config["MONGODB_SETTINGS"] = {"db": "labs-website"}
app.config["SECRET_KEY"] = "SOMERANDOMSTRING"

db = MongoEngine(app)

# import and register the Blueprints
from app.routes.project import project
from app.routes.home import home

app.register_blueprint(project)
app.register_blueprint(home)

# Because our routes are now spread across multiple modules, we need to use the
# #Blueprint name to specify which module the desired route lives in. The string
# #inside a call to url_for is blueprint_name.function_name. We can very easily
# #update home.html to reflect this
# OLD: {{ url_for('home_page') }}
# NEW: {{ url_for('home.home_page') }}
Beispiel #18
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "my_tumble_log", "HOST": "192.168.1.33", "PORT": 27017}
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

# client = pymongo.MongoClient(host='192.168.1.33', port=27017)
# if 'MONGODB_SETTINGS' in config:
#     # Connection settings provided as a dictionary.
#     connection = _create_connection(config['MONGODB_SETTINGS'])
# else:
#     # Connection settings provided in standard format.
#     settings = {'alias': config.get('MONGODB_ALIAS', None),
#                 'db': config.get('MONGODB_DB', None),
#                 'host': config.get('MONGODB_HOST', None),
#                 'password': config.get('MONGODB_PASSWORD', None),
#                 'port': config.get('MONGODB_PORT', None),
#                 'username': config.get('MONGODB_USERNAME', None)}

# db = MongoEngine(app)
db = MongoEngine(app, app.config)


def register_blueprints(app):
    # prevents circular imports
    from tumblelog.views import posts
    from tumblelog.admin import admin

    app.register_blueprint(posts)
    app.register_blueprint(admin)
Beispiel #19
0
from flask_mongoengine import MongoEngine

from wtforms import form, fields, validators

import flask_admin as admin
import flask_login as login
from flask_admin.contrib.mongoengine import ModelView

# Create application
app = Flask(__name__)

# Create dummy secrey key so we can use sessions
app.config["SECRET_KEY"] = "123456790"

# MongoDB settings
app.config["MONGODB_SETTINGS"] = {"DB": "test"}
db = MongoEngine()
db.init_app(app)


# Create user model. For simplicity, it will store passwords in plain text.
# Obviously that's not right thing to do in real world application.
class User(db.Document):
    login = db.StringField(max_length=80, unique=True)
    email = db.StringField(max_length=120)
    password = db.StringField(max_length=64)

    # Flask-Login integration
    def is_authenticated(self):
        return True
Beispiel #20
0
from mongo_fields import SwappedPointField

# config


app = Flask(__name__)

app.logger.addHandler(logging.StreamHandler(sys.stdout))
app.logger.setLevel(logging.ERROR)

app.config["MONGODB_SETTINGS"] = {"db": "motoparking", "host": "mongodb://localhost:27017/motoparking"}
app.config["DEBUG"] = True

app.config["SECRET_KEY"] = "super-secret"
app.config["SECURITY_PASSWORD_HASH"] = "pbkdf2_sha512"
app.config["SECURITY_PASSWORD_SALT"] = "ytdjf.jk,upo8etsgdf,asdf34ttgewgq3g[q[epqogqjg;"
app.config["SECURITY_REGISTERABLE"] = True
app.config["SECURITY_MSG_LOGIN"] = (u"Вы не авторизованы или Вас нет в списках доступа.", "info")

if os.environ.get("MONGODB_DB"):
    app.config["MONGODB_SETTINGS"] = {"db": os.environ.get("MONGODB_DB"), "host": os.environ.get("PROD_MONGODB")}
    app.config["DEBUG"] = False
    app.config["SECRET_KEY"] = os.environ.get("SECRET_KEY")
    app.config["SECURITY_PASSWORD_SALT"] = os.environ.get("SECURITY_PASSWORD_SALT")

# app.config['SECURITY_LOGIN_USER_TEMPLATE'] = "login.html"

# app.config['SOCIAL_FACEBOOK'] = {
#     'consumer_key': '1556008511346406',
#     'consumer_secret': 'a2ed924ccd3e3cf15a392b23fdb37f25'  # TODO: change and move out
# }
Beispiel #21
0
from flask import Flask, jsonify
import pandas as pd
import numpy as np
from flask.ext.mongoengine import MongoEngine
import json

app = Flask(__name__, template_folder="common", static_folder="common", static_url_path="")

app.config["MONGODB_SETTINGS"] = {"db": "ViralMint"}
# app.config["SECRET_KEY"] = "K33pTh1sS3cr3t"
db = MongoEngine(app)


class Campaign(db.Document):
    Name = db.StringField(required=True)
    Impressions = db.IntField()
    Conversions = db.IntField()
    CTR = db.IntField()
    Revenue = db.IntField()


# Building the dataFrame
dataFrame = pd.DataFrame(np.random.randint(1, 100, (50, 4)))
names = pd.DataFrame(["burger", "fries", "coke", "wedges", "milkshake"] * 10)
dataFrame = pd.concat([names, dataFrame], axis=1)
dataFrame.columns = [0, 1, 2, 3, 4]
# dataFrame.columns = ['Name', 'Impressions', 'Conversions', 'CTR', 'Revenue']


@app.route("/")
def initialiseTemplate():
Beispiel #22
0
from flask_debugtoolbar import DebugToolbarExtension
from flask_login import LoginManager

from utils import user_unauthorized_callback, load_user

from urls import add_urls

# Determining the project root.
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))

# Creating the Flask app object
app = Flask(__name__, static_folder=os.path.join(PROJECT_ROOT, "static"), static_url_path="/static")

# Flask config settings
app.config["MONGODB_DB"] = "ncdc"
app.config["MONGODB_SETTINGS"] = {"USERNAME": "<name>", "PASSWORD": "<password>", "DB": "<db>"}
app.config["SECRET_KEY"] = "my_super_secret_key"
app.debug = False

# Setting up the login manager for Flask-Login
login_manager = LoginManager()
login_manager.init_app(app)
login_manager.unauthorized_handler(user_unauthorized_callback)
login_manager.user_loader(load_user)

# Setting up the connection to the MongoDB backend.
db = MongoEngine(app)

# Add all of the url rules for the application.  Any url answered by the application must be
# mapped to a view function here.
add_urls(app)
Beispiel #23
0
import json

from flask import Flask, render_template, request, url_for, redirect, send_file
from flask.views import MethodView

from flask.ext.mongoengine import MongoEngine
from flask.ext.mongoengine.wtf import model_form

from mongoengine import signals, queryset_manager
from mongoengine.base.datastructures import BaseList
from wtforms.widgets import TextInput
from markdown2 import markdown


app = Flask(__name__, static_url_path="/static")
app.config["MONGODB_SETTINGS"] = {"db": "sakebowl"}
app.secret_key = os.environ.get("SECRET_KEY")

db = MongoEngine(app)


class LayoutField(db.Document):
    KIND_STRING = "string"
    KIND_LIST = "list"

    KIND_CHOICES = ((KIND_STRING, KIND_STRING), (KIND_LIST, KIND_LIST))

    name = db.StringField(unique_with=["kind"])
    kind = db.StringField(choices=KIND_CHOICES)
    created = db.DateTimeField()
    updated = db.DateTimeField()
from flask import Flask
from flask.ext.mongoengine import MongoEngine

app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "my_tumble_log"}
app.config["SECRET_KEY"] = "KeepTHisS3cr3t"

db = MongoEngine(app)

if __name__ == "__main__":
    app.run()
Beispiel #25
0
from flask_humanize import Humanize

##########################################################################
## Flask Application
##########################################################################

# set up an app instance
app = Flask(__name__)

# set debug to true to get debug pages when there is an error
app.debug = settings.debug

# configure the app with the confire settings
app.config["MONGODB_SETTINGS"] = {
    "db": settings.database.name,
    "host": settings.database.host,
    "port": settings.database.port,
}

# connect to the database using the Flask extension
db = MongoEngine(app)

# add the humanize extension
humanize = Humanize(app)

##########################################################################
## Routes
##########################################################################


@app.route("/")
Beispiel #26
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine
import os

app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"DB": "song_match"}
app.config["SECRET_KEY"] = os.getenv("SECRET_KEY")

db = MongoEngine(app)

if __name__ == "__main__":
    app.run()
Beispiel #27
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine


app = Flask(__name__)
app.config["MONGODB_SETTINGS"] = {"host": "mongodb://mjn:mjnmjn@ds027483.mongolab.com:27483/heroku_8vvwb6hd"}
app.config["SECRET_KEY"] = "WhoCares"
db = MongoEngine(app)

from fivesquare import views


if __name__ == "__main__":
    app.run()
Beispiel #28
0
def create_app():
    app = Flask(__name__)

    # Create modules
    app.register_blueprint(rootModule)
    app.register_blueprint(moodlensModule)
    app.register_blueprint(opinionModule)
    app.register_blueprint(propagateModule)
    app.register_blueprint(indexModule)
    app.register_blueprint(evolutionModule)
    app.register_blueprint(identifyModule)
    app.register_blueprint(quota_systemModule)
    app.register_blueprint(dataoutModule)

    # the debug toolbar is only enabled in debug mode
    app.config["DEBUG"] = True

    app.config["ADMINS"] = frozenset(["youremail@yourdomain.com"])
    app.config["SECRET_KEY"] = "SecretKeyForSessionSigning"

    app.config["SQLALCHEMY_DATABASE_URI"] = "mysql+mysqldb://%s:@%s/%s?charset=utf8" % (
        MYSQL_USER,
        MYSQL_HOST,
        MYSQL_DB,
    )
    app.config["SQLALCHEMY_ECHO"] = False
    app.config["DATABASE_CONNECT_OPTIONS"] = {}

    app.config["THREADS_PER_PAGE"] = 8

    app.config["CSRF_ENABLED"] = True
    app.config["CSRF_SESSION_KEY"] = "somethingimpossibletoguess"

    # Enable the toolbar?
    app.config["DEBUG_TB_ENABLED"] = app.debug
    # Should intercept redirects?
    app.config["DEBUG_TB_INTERCEPT_REDIRECTS"] = True
    # Enable the profiler on all requests, default to false
    app.config["DEBUG_TB_PROFILER_ENABLED"] = True
    # Enable the template editor, default to false
    app.config["DEBUG_TB_TEMPLATE_EDITOR_ENABLED"] = True
    # debug toolbar
    # toolbar = DebugToolbarExtension(app)

    app.config["MONGO_HOST"] = MONGODB_HOST
    app.config["MONGO_PORT"] = MONGODB_PORT

    app.config["MONGODB_SETTINGS"] = {"db": MASTER_TIMELINE_54API_WEIBO_DB, "host": MONGODB_HOST, "port": MONGODB_PORT}

    # Create mysql database
    db.init_app(app)
    with app.test_request_context():
        db.create_all()

    # Create mongo_engine
    mongo_engine.init_app(app)

    admin.init_app(app)
    """
    # Create mysql database admin, visit via url: http://HOST:PORT/admin/
    for m in model.__all__:
        m = getattr(model, m)
        n = m._name()
        admin.add_view(SQLModelView(m, db.session, name=n))

    for m in mongodb_model.__all__:
        admin.add_view(MongoDBView(m))
    """

    # init mongo
    mongo.init_app(app)

    return app
Beispiel #29
0
from flask import Flask
from flask.ext.mongoengine import MongoEngine
from flask.ext.login import LoginManager
import bcrypt

app = Flask(__name__)

if __name__ == "__main__":
    app.run()

lm = LoginManager()
lm.init_app(app)

app.config.from_object("config")
app.config["MONGODB_SETTINGS"] = {"DB": "nextsteps"}
app.config["SECRET_KEY"] = "KeepThisS3cr3t"

db = MongoEngine(app)
from app import views

# Flask LoginManager allows you to easily store "login" context
# It also lets you login/logout.
# This also allows users to restrict views to logged-in or logged out users
ADMIN_PASSWORD = "secret"
APP_DIR = os.path.dirname(os.path.realpath(__file__))
# The secret key is used internally by Flask to encrypt session data stored
# in cookies. Make this unique for your app
DATABASE = "sqliteext:///%s" % os.path.join(APP_DIR, "blog.db")
DEBUG = False
SECRET_KEY = "shhh, secret!"
# This is used by micawber, which will attempt to generate rich media
# embedded objects with maxwidth=800.
SITE_WIDTH = 800

app = Flask(__name__)
app.config.from_object(__name__)

app.config["MONGODB_SETTINGS"] = {"DB": "staticContent"}
app.config["SECRET_KEY"] = "JA%*&DNA&D^)A"
db = SQLAlchemy(app)
babel = Babel(app)
flask_db = FlaskDB(app)
database = flask_db.database
mongo = MongoClient("localhost", 27017)["interstellerDB"]
if not app.config["DEBUG"]:
    install_secret_key(app)


@app.route("/hello", methods=["GET"])
def hello():
    return "Hello"