i keep getting this error when ever i try to run my flask web app
AttributeError: 'Blueprint' object has no attribute 'config'
i have try many tutorial online still not working.
so here is my code blow
from __future__ import unicode_literals
from flask import Blueprint
from flask import flash, current_app
from flask import g
from flask import render_template
from flask import url_for
from werkzeug.exceptions import abort
import requests
from hashlib import md5
from flaskr.auth import login_required
from flaskr.db import get_db
import subprocess
import youtube_dl
import os
import sys
from flask import Flask, render_template, request, send_file, redirect, jsonify
from subprocess import check_output, call
from os import chdir as cd
from re import match
from flask_mysqldb import MySQL
bp = Blueprint("home", __name__)
mysql = MySQL(bp)
#Enter here your database informations
bp.config["MYSQL_HOST"] = "localhost"
bp.config["MYSQL_USER"] = "root"
bp.config["MYSQL_PASSWORD"] = ""
bp.config["MYSQL_DB"] = "artist_database "
bp.config["MYSQL_CURSORCLASS"] = "DictCursor"
@bp.route("/")
def index():
return render_template("home.html")
@bp.route("/auth.login")
def login():
return render_template("login.html")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…