127.0.0.1 - - [26/Feb/2019 12:51:50] "GET /admin/adminfileview/upload/banners HTTP/1.1" 200 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "POST /admin/adminfileview/upload/banners HTTP/1.1" 302 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/adminfileview/b/banners HTTP/1.1" 200 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/bootstrap/bootstrap2/css/bootstrap-responsive.css?v=2.3.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/vendor/jquery.min.js?v=2.1.4 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/bootstrap/bootstrap2/js/bootstrap.min.js?v=2.3.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/bootstrap/bootstrap2/swatch/default/bootstrap.min.css?v=2.3.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/admin/css/bootstrap2/admin.css?v=1.1.1 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/vendor/moment.min.js?v=2.9.0 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/vendor/select2/select2.min.js?v=3.5.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /admin/static/admin/js/actions.js?v=1.0.0 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:51:56] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/users/ HTTP/1.1" 200 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/static/bootstrap/bootstrap2/swatch/default/bootstrap.min.css?v=2.3.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/static/bootstrap/bootstrap2/css/bootstrap-responsive.css?v=2.3.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/static/vendor/bootstrap-daterangepicker/daterangepicker-bs2.css?v=1.3.22 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/static/vendor/select2/select2.css?v=3.5.2 HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2019 12:52:12] "GET /admin/static/admin/css/bootstrap2/admin.css?v=1.1.1 HTTP/1.1" 304 -
(flaskdev) mikhail@calculate /var/www/localhost/htdocs/test1.ru/apps $
from app import app
import admin
import views
if __name__=='__main__':
if app.debug == True:
pass
#import logging
#logging.getLogger('sqlalchemy.engine').setLevel(logging.DEBUG)
#logging.getLogger('sqlalchemy.dialects').setLevel(logging.DEBUG)
#logging.getLogger('sqlalchemy.pool').setLevel(logging.DEBUG)
#logging.getLogger('sqlalchemy.orm').setLevel(logging.DEBUG)
#logging.basicConfig(filename='errors.log',level=logging.DEBUG)
app.run()
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from configs import Configuration
from flask_security import SQLAlchemyUserDatastore, Security
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
#from flask_debugtoolbar import DebugToolbarExtension
from flask_mail import Mail
app = Flask(__name__)
app.config.from_object(Configuration)
db = SQLAlchemy(app)
mail = Mail(app)
#toolbar = DebugToolbarExtension(app)
from models import Users, Roles
user_datastore = SQLAlchemyUserDatastore(db, Users, Roles)
security = Security(app, user_datastore)
# Then later on.
#app = create_app('the-config.cfg')
#toolbar.init_app(app)
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)