Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Deprecated library #33

Open
lightoyou opened this issue Feb 2, 2018 · 2 comments
Open

Deprecated library #33

lightoyou opened this issue Feb 2, 2018 · 2 comments

Comments

@lightoyou
Copy link

lightoyou commented Feb 2, 2018

Hey can you change this ?

OLD (deprecated) models.py

from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import UserMixin, AnonymousUserMixin
from flask.ext.scrypt import generate_random_salt, generate_password_hash, check_password_hash

New 👍 models.py

from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin, AnonymousUserMixin
from flask_scrypt import generate_random_salt, generate_password_hash, check_password_hash

And now i have this error
(virtenv) dsqd@ubuntu:~/cve-portal/app$ python create.py
Traceback (most recent call last):
File "create.py", line 3, in
models.db.drop_all()
File "/home/retis/cve-portal/app/virtenv/local/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 971, in drop_all
self._execute_for_all_tables(app, bind, 'drop_all')
File "/home/retis/cve-portal/app/virtenv/local/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 940, in _execute_for_all_tables
app = self.get_app(app)
File "/home/retis/cve-portal/app/virtenv/local/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 912, in get_app
'No application found. Either work inside a view function or push'
RuntimeError: No application found. Either work inside a view function or push an application context. See http://fla

@pawneeranger
Copy link

Same error for me after updating the import's syntax
Any idea about where it might come from ?

@dsever
Copy link

dsever commented Dec 21, 2018

Same here, I looks like this project is not longer maintaining?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants