from app import app from models import Note from models import Task from api import api import views api.setup() app.debug = True if __name__ == '__main__': Note.create_table(True) Task.create_table(True) app.run()
from app import app from auth import auth # from flask import Blueprint, abort, request, Response, session, redirect, url_for, g from peewee import IntegrityError from admin import admin from api import api from views import * admin.setup() api.setup() if __name__ == '__main__': auth.User.create_table(fail_silently=True) # Note.create_table(fail_silently=True) try: admin = auth.User(username='******', email='', admin=True, active=True) admin.set_password('admin') admin.save() except IntegrityError: print "User 'admin' already created!" app.debug = True app.run(host='0.0.0.0', port=8008)
from api import api api = api.setup()