I have a class based admin view:
class All_RDPs(BaseView):
@expose('/')
def index(self):
return 'ok1'
@expose('/test')
def testindex(self):
return 'ok2'
which is registered in Flask-Admin, for example:
admin.add_view(All_RDPs(name='dep_rdp'))
and then displayed in the browser like this:
http://localhost/admin/all_rdps/
http://localhost/admin/all_rdps/test
the question arises:
- how to specify the url of this class instead of the default generated name
all_rdps? - How to use
url_forto generate URLs for these endpoints? url_for('admin.All_RDPs.testindex'), url_for('admin.All_RDPs')Do not work.
source
share