Utilize pylint como linter y corregi la mayoria de los errores
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import os
|
||||
|
||||
from flask import Flask, render_template
|
||||
from werkzeug import SharedDataMiddleware
|
||||
from werkzeug.wsgi import SharedDataMiddleware
|
||||
|
||||
|
||||
def create_app():
|
||||
app = Flask(__name__, instance_relative_config=True)
|
||||
|
||||
app.config.from_mapping(
|
||||
SQLALCHEMY_DATABASE_URI="sqlite:///{}".format(os.path.join(app.instance_path, 'files.sqlite')),
|
||||
SQLALCHEMY_DATABASE_URI="sqlite:///{}".format(
|
||||
os.path.join(app.instance_path, 'files.sqlite')),
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS=False,
|
||||
USERNAME='dev',
|
||||
PASSWORD='secret',
|
||||
@@ -17,7 +18,8 @@ def create_app():
|
||||
)
|
||||
|
||||
app.config.from_pyfile('config.py')
|
||||
app.wsgi_app = SharedDataMiddleware(app.wsgi_app, {'/uploads': app.config['UPLOAD_FOLDER']})
|
||||
app.wsgi_app = SharedDataMiddleware(
|
||||
app.wsgi_app, {'/uploads': app.config['UPLOAD_FOLDER']})
|
||||
|
||||
try:
|
||||
os.makedirs(app.instance_path)
|
||||
@@ -33,6 +35,9 @@ def create_app():
|
||||
from files import auth
|
||||
app.register_blueprint(auth.bp)
|
||||
|
||||
from files import admin
|
||||
app.register_blueprint(admin.bp)
|
||||
|
||||
from files import categories
|
||||
app.register_blueprint(categories.bp)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user