Closed zw1765 closed 3 weeks ago
我已经安装了python-dotenv pip show python-dotenv Name: python-dotenv Version: 0.14.0
输入flask --help看看输出啥
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/home/zw/code/Blogin/blogin/init.py", line 32, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 556, in list_commands rv.update(info.load_app().cli.list_commands(ctx)) File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 388, in load_app app = locate_app(self, import_name, name) File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 245, in locate_app raise NoAppException( flask.cli.NoAppException: While importing "blogin", an ImportError was raised:
Traceback (most recent call last):
File "/home/zw/Downloads/yes/lib/python3.10/site-packages/flask/cli.py", line 240, in locate_app
import(module_name)
File "/home/zw/code/Blogin/blogin/init.py", line 32, in
Usage: flask [OPTIONS] COMMAND [ARGS]...
A general utility script for Flask applications.
Provides commands from Flask, extensions, and the application. Loads the application defined in the FLASK_APP environment variable, or from a wsgi.py file. Setting the FLASK_ENV environment variable to 'development' will enable debug mode.
$ export FLASK_APP=hello.py
$ export FLASK_ENV=development
$ flask run
Options: --version Show the flask version --help Show this message and exit.
Commands: db Perform database migrations. routes Show the routes for the app. run Run a development server. shell Run a shell in the app context.
ImportError: /home/zw/Downloads/yes/lib/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send 这里有问题
你升级一下feedgen这个的版本试试
上面的问题解决了,是我的python版本过高的问题。 现在我完成了上面的步骤,出现了登录界面打不开
redis配置不对
需要在哪里设置redis账号密码呢
你看ban_ip = rd.get(str(remote_ip))这句代码的rd在哪里定义的,就在那里配置。
好的,感谢指导
后台管理,怎么打开呀。我登录了管理员用户,找不到新建博客等内容
老铁找到了吗,我也没找到
(venv) (base) zw@DESKTOP-TIVUPRV:~/code/Blogin$ flask initdb Usage: flask [OPTIONS] COMMAND [ARGS]... Try 'flask --help' for help.
Error: No such command 'initdb'.