Giter Site home page Giter Site logo

maple-bbs's Introduction

maple-bbs

https://img.shields.io/badge/license-GPL3.0-blue.svg https://img.shields.io/badge/python-3.4-brightgreen.svg

English | 中文

https://raw.githubusercontent.com/honmaple/maple-bbs/master/screenshooter/index.png https://raw.githubusercontent.com/honmaple/maple-bbs/master/screenshooter/board.png https://raw.githubusercontent.com/honmaple/maple-bbs/master/screenshooter/ask.png

This is a free,open-source forums system based on the flask

If you have used maple-bbs before 2017-4-1,please use upgrade script to upgrade data

important ! : please modify script to configure as your own database.

# session1:old database
# session2:new database
python upgrade.py
python upgrade_count.py

Features

  • Register & login & forget password
  • Board and tags
  • Collect
  • Like replies
  • Follow tags,users,topics
  • Privacy setting
  • Choice markdown to ask
  • Tags rss
  • Avatar
  • Full text search with whoosh

Installation

mkvirtualenv forums

Install necessary package

pip install -r requirements.txt

Config

mv config.example config.py

remember to modify config file.

Init sql

python runserver.py db init 
python runserver.py db migrate -m "first migrate"
python runserver.py db upgrade

Or

python runserver.py initdb

create full text index

python runserver.py create_index

Create admin account

python runserver.py create_user

Login and visit admin

Ok ,visit forums.localhost:8000/admin to add something

Demo

Please visit forums.honmaple.org

License

maple-bbs is open-sourced software licensed under the GPL3 license

maple-bbs's People

Contributors

honmaple avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maple-bbs's Issues

python3.5 404錯誤,找不到原因!

每一步都是按说明走的,正常跑起来后,所有页面都是返回404错误!检查了blue_print挂载情况,确实都在url_map中。就是找不到哪里出问题了!下图是具体情况:
_ _20180312205819

关于request.data的问题

forums/common/utils.py中gen_order_by函数的参数query_dict为字典,经过descent = query_dict.pop('orderby', None)处理,descent = descent.split(',')然后进行分割,但是字典不能分割吧?(另外,正常request.data不应该是{}吗?那么这么写的意义是什么呢?)

python3 runserver.py initdb 执行后,报错

如果执行 python3 runserver.py db init ,提示没有 db 这个命令。
如果执行 python3 runserver.py initdb,出下面这些。请问大佬们该如何解决?

/usr/local/python/lib/python3.6/site-packages/flask_sqlalchemy/init.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
/usr/local/python/lib/python3.6/site-packages/flask_caching/init.py:184: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
Traceback (most recent call last):
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 492, in checkout
rec = pool._do_get()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 139, in _do_get
self._dec_overflow()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 136, in _do_get
return self._create_connection()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 437, in init
self.__connect(first_connect_check=True)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 639, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/python/lib/python3.6/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "runserver.py", line 175, in
cli.main()
File "/usr/local/python/lib/python3.6/site-packages/flask/cli.py", line 380, in main
return AppGroup.main(self, *args, **kwargs)
File "/usr/local/python/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/python/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/python/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/python/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/python/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/python/lib/python3.6/site-packages/flask/cli.py", line 257, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/python/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "runserver.py", line 105, in initdb
db.drop_all()
File "/usr/local/python/lib/python3.6/site-packages/flask_sqlalchemy/init.py", line 1015, in drop_all
self._execute_for_all_tables(app, bind, 'drop_all')
File "/usr/local/python/lib/python3.6/site-packages/flask_sqlalchemy/init.py", line 999, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/sql/schema.py", line 4313, in drop_all
ddl.SchemaDropper, self, checkfirst=checkfirst, tables=tables
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/local/python/lib/python3.6/contextlib.py", line 81, in enter
return next(self.gen)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
raise value.with_traceback(tb)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 363, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 760, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 492, in checkout
rec = pool._do_get()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 139, in _do_get
self._dec_overflow()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
raise value
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/impl.py", line 136, in _do_get
return self._create_connection()
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 308, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 437, in init
self.__connect(first_connect_check=True)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/pool/base.py", line 639, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/python/lib/python3.6/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/local/python/lib/python3.6/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

(Background on this error at: http://sqlalche.me/e/e3q8)

创建数据库提示无法导入文件

Traceback (most recent call last): File "runserver.py", line 19, in <module> from forums import create_app File "F:\PycharmProjects\maple-bbs\forums\__init__.py", line 19, in <module> from forums import api, docs, admin File "F:\PycharmProjects\maple-bbs\forums\api\__init__.py", line 13, in <module> from forums.api.forums import urls as forums_url ImportError: No module named api.forums

Python3报错?

(venv) ➜  maple-bbs git:(master) ✗ python runserver.py initdb
/Volumes/APPLE-HDD/Document/Coding/Python/maple-bbs/venv/lib/python3.7/site-packages/flask_caching/__init__.py:184: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
  warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
(venv) ➜  maple-bbs git:(master) ✗ python runserver.py create_index
/Volumes/APPLE-HDD/Document/Coding/Python/maple-bbs/venv/lib/python3.7/site-packages/flask_caching/__init__.py:184: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
  warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
Usage: runserver.py [OPTIONS] COMMAND [ARGS]...
Try "runserver.py --help" for help.

Error: No such command "create_index".
(venv) ➜  maple-bbs git:(master) ✗ 
(venv) ➜  maple-bbs git:(master) ✗ 
(venv) ➜  maple-bbs git:(master) ✗ python runserver.py create_user
/Volumes/APPLE-HDD/Document/Coding/Python/maple-bbs/venv/lib/python3.7/site-packages/flask_caching/__init__.py:184: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
  warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
Usage: runserver.py [OPTIONS] COMMAND [ARGS]...
Try "runserver.py --help" for help.

Error: No such command "create_user".
(venv) ➜  maple-bbs git:(master) ✗
(venv) ➜  maple-bbs git:(master) ✗
(venv) ➜  maple-bbs git:(master) ✗python runserver.py
Connected to pydev debugger (build 183.5429.31)
/Volumes/APPLE-HDD/Document/Coding/Python/maple-bbs/venv/lib/python3.7/site-packages/flask_caching/__init__.py:184: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
  warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
 * Serving Flask app "runserver"
 * Forcing debug mode off
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)


127.0.0.1 - - [05/Jun/2019 17:50:03] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [05/Jun/2019 17:50:04] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [05/Jun/2019 17:54:43] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [05/Jun/2019 17:54:45] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [05/Jun/2019 17:54:52] "GET /index.html HTTP/1.1" 404 -
127.0.0.1 - - [05/Jun/2019 17:54:54] "GET /index.html HTTP/1.1" 404 -

image

请问,这个是什么原因啊?谢谢~

templates目录下缺少HTML文件(maple/auth.html)

templates目录下的auth目录下面的login.html从templates目录下的maple目录下面导入了auth.html文件({% import 'maple/auth.html' as auth %}),但实际上maple目录下面没有auth.html文件。导入的地方也是不可点击跳转状态。

请问config.py应该如何配置?

你好,

我在运行代码的时候出现了以下错误:

redis.exceptions.ConnectionError: Error 61 connecting to localhost:6379. Connection refused.

我猜想可能是config.py配置的问题,能不能给个具体的例子呢?或者稍微说一下 config.py配置中应该注意的地方。我需要先自己创建一个数据库吗?如果我用默认的sqlite的话,代码会自动生成数据库吗?新手问的问题可能比较弱智哈多谢多谢

另外,我发现现在的代码须在python3和flask-maple==0.5.2的环境下才能运行,希望更新一下相应的信息,谢谢~

The CSRF session token is missing?

你好,首页可以正常访问,但是当我注册或者登录的时候报400的错误,无法登录,The CSRF session token is missing
谢谢

forget password无法找回密码

  1. 点击forget password,填好信息确认后会一直提示邮箱出错。
  2. 偶现whoosh index lock错误,然后编辑问题确认后会一直停留在编辑页面不会跳转。

关于依赖版本问题

你好,关于你说的依赖版本要和你文件中的一致,但是很多文件相应的版本无法下载,比如:cffi==1.11.4,下载就会报错无法完成下载,只有下载最新的1.13.2.所以想问一下如果要使系统正常启动运行哪些版本是要一定和你文件中的一致?

您好,我在ubuntu14.04系统下搭建了您的项目,搭建结束运行时,网页出现了一下问题,请问我要怎么解决?

redis.exceptions.ResponseError

redis.exceptions.ResponseError: Client sent AUTH, but no password is set
Traceback (most recent call last)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 2000, in __call__

return self.wsgi_app(environ, start_response)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1991, in wsgi_app

response = self.make_response(self.handle_exception(e))

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1567, in handle_exception

reraise(exc_type, exc_value, tb)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise

raise value

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1988, in wsgi_app

response = self.full_dispatch_request()

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1641, in full_dispatch_request

rv = self.handle_user_exception(e)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1544, in handle_user_exception

reraise(exc_type, exc_value, tb)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise

raise value

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1637, in full_dispatch_request

rv = self.preprocess_request()

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/flask/app.py", line 1837, in preprocess_request

rv = func()

File "/home/wmy/maple-bbs-master/forums/common/middleware.py", line 49, in preprocess_request

mark_online(request.remote_addr)

File "/home/wmy/maple-bbs-master/forums/common/records.py", line 38, in mark_online

high = redis_data.hget('online_users', 'high:counts')

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/client.py", line 1857, in hget

return self.execute_command('HGET', name, key)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/client.py", line 572, in execute_command

connection.send_command(*args)

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/connection.py", line 563, in send_command

self.send_packed_command(self.pack_command(*args))

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/connection.py", line 538, in send_packed_command

self.connect()

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/connection.py", line 446, in connect

self.on_connect()

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/connection.py", line 514, in on_connect

if nativestr(self.read_response()) != 'OK':

File "/home/wmy/maple-bbs-master/py3env/lib/python3.4/site-packages/redis/connection.py", line 582, in read_response

raise response

redis.exceptions.ResponseError: Client sent AUTH, but no password is set

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.

To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:

dump() shows all variables in the frame
dump(obj) dumps all that's known about the object

Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.

如何在外部访问admin页面

我在centos上进行了开发部署,使用ssh连接,当我启动服务时,如何在我的外部机器上访问admin页面?

在本地运行出现找不到服务器错误

作者你好,我刚刚按照README中的过程配置好了程序,但是在本地浏览器访问forums.localhost:8000时,出现了
Screen Shot 2019-12-24 at 4 21 10 PM
请问这是为什么呢?服务器已经在运行了:python runserver.py runserver

初始化sql时故障

环境,安装包都配置完成。
python runserver.py db init之后报错__init__() got an unexpected keyword argument 'use_auth'
并且小白一枚,能麻烦博主指导一下config.example具体该怎么配置吗,谢谢了!

MIDDLEWARE不生效

在config.py中配置MIDDLEWARE = ["test.common.middleware.GlobalMiddleware"],但是GlobalMiddleware的preprocess_request没有执行,请问这个怎么解决

执行 python3 runserver.py initdb报错

Traceback (most recent call last):
File "runserver.py", line 19, in
from forums import create_app
File "/root/maple-bbs/forums/init.py", line 17, in
from forums import app as ap, extension
File "/root/maple-bbs/forums/extension/init.py", line 22, in
from . import babel, login, maple
File "/root/maple-bbs/forums/extension/maple.py", line 25, in
use_auth=True)
TypeError: init() got an unexpected keyword argument 'use_auth'

Address family not supported by protocol.

启动访问页面报以下错误

redis.exceptions.ConnectionError

redis.exceptions.ConnectionError: Error 97 connecting to localhost:6379. Address family not supported by protocol.

运行错误 ExtDeprecationWarning

PS C:\bbs_SE> python manager.py init_db
C:\bbs_SE\forums\extension.py:87: FlaskWTFDeprecationWarning: "flask_wtf.CsrfProtect" has been renamed to "CSRFProtect" and will be removed in 1.0.
csrf = CsrfProtect()
C:\Python36\lib\site-packages\flask_sqlalchemy_init_.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
C:\Python36\lib\site-packages\flask_cache_init_.py:152: UserWarning: Flask-Cache: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn("Flask-Cache: CACHE_TYPE is set to null, "
C:\Python36\lib\site-packages\flask\exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
PS C:\bbs_SE>

PermissionError: [Errno 13] Permission denied问题

您好,最近在搞您的这个bbs,但是运行python3 runserver.py 后遇到以下错误说权限被拒绝,希望得到您的帮助,谢谢
python3 runserver.py
/home/b3log/anaconda3/lib/python3.7/site-packages/flask_sqlalchemy/init.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
runserver.py:28: DeprecationWarning: 'werkzeug.contrib.fixers.ProxyFix' has moved to 'werkzeug.middleware.proxy_fix.ProxyFix'. This import is deprecated as of version 0.15 and will be removed in 1.0.
app.wsgi_app = ProxyFix(app.wsgi_app)

  • Serving Flask app "forums" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: on
    Traceback (most recent call last):
    File "runserver.py", line 173, in
    app.run()
    File "/home/b3log/anaconda3/lib/python3.7/site-packages/flask/app.py", line 990, in run
    run_simple(host, port, self, **options)
    File "/home/b3log/anaconda3/lib/python3.7/site-packages/werkzeug/serving.py", line 987, in run_simple
    s.bind(server_address)
    PermissionError: [Errno 13] Permission denied

cannot import name bootstrap from flask-maple

python runserver.py时遇到的:

Traceback (most recent call last):
File "runserver.py", line 10, in
from maple import create_app
File "C:\maple-bbs-release-v1\maple_init_.py", line 15, in
from maple.auth.views import register_auth
File "C:\maple-bbs-release-v1\maple\auth\views.py", line 14, in
from maple.extension import mail, redis_data
File "C:\maple-bbs-release-v1\maple\extension.py", line 23, in
from flask_maple import Bootstrap, Error, Captcha
ImportError: cannot import name 'Bootstrap' from 'flask_maple' (C:\ProgramData\A
naconda3\lib\site-packages\flask_maple_init_.py)

测试发现注册邮件无法接收,关注节点后无法取消,同时后台管理点击create时会报错

File "E:\pengl\lib\site-packages\flask_admin\contrib\sqla\fields.py", line 103, in
self._object_list = [(text_type(get_pk(obj)), obj) for obj in query]
File "E:\pengl\lib\site-packages\flask_admin\contrib\sqla\fields.py", line 300, in get_pk_from_identity
cls, key = identity_key(instance=obj)
ValueError: too many values to unpack (expected 2)
点击后报如上错误

点击关注的节点也会出现报错。

望解答fix

启动访问页面404

启动访问localhost:8000/admin页面显示404,
启中配置如下
SERVER_NAME = '0.0.0.0:8000'
SUBDOMAIN = {'forums': False, 'docs': False}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.