我有一个基于类的管理视图:
class All_RDPs(BaseView):
@expose('/')
def index(self):
return 'ok1'
@expose('/test')
def testindex(self):
return 'ok2'
在Flask Admin注册如下:
^{pr2}$然后可以从浏览器中查看,如下所示:
http://localhost/admin/all_rdps/
http://localhost/admin/all_rdps/test
问题是:
all_rdps
?在url_for
为这些端点生成url?url_for('admin.All_RDPs.testindex')
,url_for('admin.All_RDPs')
不起作用。在
来源:Flask-Admin quickstart
相关问题 更多 >
编程相关推荐