hfuuss / python-movie Goto Github PK
View Code? Open in Web Editor NEW基于flask+mysql的电影视频网站。
基于flask+mysql的电影视频网站。
Traceback (most recent call last):
File "E:\python-movie-master\app\admin\forms.py", line 5, in
from app.models import Admin,Tag
File "E:\python-movie-master\app_init_.py", line 16, in
from app.admin import admin as admin_blueprint
File "E:\python-movie-master\app\admin_init_.py", line 6, in
import app.admin.views
File "E:\python-movie-master\app\admin\views.py", line 4, in
from app.admin.forms import LoginForm,TagForm,MovieForm,PreviewForm
File "E:\python-movie-master\app\admin\forms.py", line 6, in
tags = Tag.query.all()
File "E:\python-movie-master\venv\lib\site-packages\flask_sqlalchemy\model.py", line 31, in get
cls, session=cls.fsa.session() # type: ignore[arg-type]
File "E:\python-movie-master\venv\lib\site-packages\sqlalchemy\orm\scoping.py", line 217, in call
sess = self.registry()
File "E:\python-movie-master\venv\lib\site-packages\sqlalchemy\util_collections.py", line 640, in call
key = self.scopefunc()
File "E:\python-movie-master\venv\lib\site-packages\flask_sqlalchemy\session.py", line 102, in _app_ctx_id
return id(app_ctx._get_current_object()) # type: ignore[attr-defined]
File "E:\python-movie-master\venv\lib\site-packages\werkzeug\local.py", line 508, in _get_current_object
raise RuntimeError(unbound_message) from None
RuntimeError: Working outside of application context.
This typically means that you attempted to use functionality that needed
the current application. To solve this, set up an application context
with app.app_context(). See the documentation for more information.
想问下这个是为什么,是代码哪里有问题吗
app/home/views.py
:
@home.route("/")
def index():
return render_template("home/index.html")
@home.route("/animation/")
def animation():
return render_template("home/animation.html")
@home.route("/search/")
def search():
return render_template("home/search.html")
@home.route("/play/")
def play():
return render_template("home/play.html")
特么你全部都是静态文件拿来忽悠人的吧?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.