Exemple #1
0
 def create_app(self):
     return create_app(self)
Exemple #2
0
"""Creates a new database but only if the database doesn't exist yet"""
from __future__ import with_statement
import os
from simblin.extensions import db
from simblin import create_app

app = create_app()

with app.test_request_context():
    # The context is needed so db can access the configuration of the app
    db.create_all()

print "Initialized new empty database in %s" % app.config['SQLALCHEMY_DATABASE_URI']
Exemple #3
0
"""Creates a new database but only if the database doesn't exist yet"""
from __future__ import with_statement
import os
from simblin.extensions import db
from simblin import create_app

app = create_app()

with app.test_request_context():
    # The context is needed so db can access the configuration of the app
    db.create_all()

print "Initialized new empty database in %s" % app.config[
    'SQLALCHEMY_DATABASE_URI']
Exemple #4
0
"""Run this file to test the blog locally on http://localhost:5000/"""
from simblin import create_app

try:
    import disqus_settings
except:
    disqus_settings = None

if __name__ == "__main__":
    app = create_app(disqus_settings) if disqus_settings else create_app()
    app.run()
Exemple #5
0
"""Creates a new database but only if the database doesn't exist yet"""
from __future__ import with_statement
import os
try:
    import settings
except ImportError:
    settings = None
from simblin.extensions import db
from simblin import create_app

app = create_app(settings)

with app.test_request_context():
    # The context is needed so db can access the configuration of the app
    db.create_all()

print "Initialized new empty database in %s" % app.config['SQLALCHEMY_DATABASE_URI']

Exemple #6
0
 def create_app(self):
     return create_app(self)