M
M
marataziat2017-10-12 18:02:56
Flask
marataziat, 2017-10-12 18:02:56

Why writes that there is no library although it is :( SQLAlchemy?

The code is like this:

from flask import Flask
 from flask_sqlalchemy import SQLAlchemy
 
 app = Flask(__name__)
 app.config['SQLAlCHERMY_DATABASE_URI'] = 'postgresql://localhost/seal'
 
 db = SQLAlchemy(app)
 
 class Messages(db.Model):
         id = db.Column(db.Integer, primary_key=True)
         Message = db.Column(db.String(256))
         Active = db.Boolean()


In the console I write:
>>> from sqll import Messages
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "sqll.py", line 2, in <module>
    from flask_sqlalchemy import SQLAlchermy
ImportError: cannot import name SQLAlchermy

MacOS

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
asd111, 2017-10-12
@asd111

SQLAlche r my typo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question