本文整理匯總了Python中dashboard.ModelDashboard方法的典型用法代碼示例。如果您正苦於以下問題:Python dashboard.ModelDashboard方法的具體用法?Python dashboard.ModelDashboard怎麽用?Python dashboard.ModelDashboard使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dashboard
的用法示例。
在下文中一共展示了dashboard.ModelDashboard方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: register_builtin_views
# 需要導入模塊: import dashboard [as 別名]
# 或者: from dashboard import ModelDashboard [as 別名]
def register_builtin_views(site):
site.register_view(r'^$', IndexView, name='index')
site.register_view(r'^login/$', LoginView, name='login')
site.register_view(r'^logout/$', LogoutView, name='logout')
site.register_view(r'^settings/user$', UserSettingView, name='user_settings')
site.register_modelview(r'^$', ListAdminView, name='%s_%s_changelist')
site.register_modelview(r'^add/$', CreateAdminView, name='%s_%s_add')
site.register_modelview(
r'^(.+)/delete/$', DeleteAdminView, name='%s_%s_delete')
site.register_modelview(
r'^(.+)/update/$', UpdateAdminView, name='%s_%s_change')
site.register_modelview(
r'^(.+)/detail/$', DetailAdminView, name='%s_%s_detail')
site.register_modelview(
r'^(.+)/dashboard/$', ModelDashboard, name='%s_%s_dashboard')
site.set_loginview(LoginView)