Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.
This repository was archived by the owner on May 12, 2020. It is now read-only.

ImportError: cannot import name 'SQLALchemy' from 'flask_sqlalchemy' #71

Description

@Sanidhya-Tyagi

i m running this code
`from flask import Flask, render_template, url_for
from flask_sqlalchemy import SQLALchemy
from datetime import datetime

app = Flask(name)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///test.db'
db = SQLALchemy(app)

class Todo(db.Model):
id = db.Column(db.Integer, primary_key=True)
content = db.Column(db.Integer, default = 0)
data_created = db.Column(db.datetime, default=datetime.utcnow)

def __repr__(self):
    return '<Task %r>' % self.id

@app.route("/")
def index():
return render_template("index.html")

if name == "main":
app.run(debug=True)`

and when i run it

ImportError: cannot import name 'SQLALchemy' from 'flask_sqlalchemy' (c:\users(My User)\onedrive\documents\flask\env\lib\site-packages\flask_sqlalchemy_init_.py)

Please help #71 #62 #9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions