Utilize pylint como linter y corregi la mayoria de los errores

This commit is contained in:
Daniel Cortes
2019-03-12 17:11:44 -03:00
parent b4b654c62f
commit 3b5008f9ed
10 changed files with 697 additions and 67 deletions

View File

@@ -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)