1
我正在使用django-admin-tools 0.4。 继文档here,以便我可以获得3列布局。django-admin-tools 3列布局不工作
我已经设法让页面正确的空间为3列,但模块不能移动到第3列。
我只能从左列拖到中间但不是右侧。
如何让模块在3列之间移动?
My dashboard.py can be viewed here. 我附上了截图以显示我有什么结果。
我正在使用django-admin-tools 0.4。 继文档here,以便我可以获得3列布局。django-admin-tools 3列布局不工作
我已经设法让页面正确的空间为3列,但模块不能移动到第3列。
我只能从左列拖到中间但不是右侧。
如何让模块在3列之间移动?
My dashboard.py can be viewed here. 我附上了截图以显示我有什么结果。
的主要问题是,admin_tools_dashboard_preferences需要被截断(几乎每一个变化而到仪表板制成。)
而且代码的第一个片段上documentation page甚至没有为我工作。我从文档的其他部分摘录了片段,他们似乎没有任何问题。 最后,我的示例仪表板看起来像这样。 请记住截断您的偏好。
class MyDashboard(Dashboard):
columns = 3
def __init__(self, **kwargs):
Dashboard.__init__(self, **kwargs)
# will only list the django.contrib.auth models
self.children += [
modules.ModelList('Authentication', ['django.contrib.auth.*',])
]
self.children.append(modules.Group(
title="My group",
display="tabs",
children=[
modules.AppList(
title='Administration',
models=('django.contrib.*',)
),
modules.AppList(
title='Applications',
exclude=('django.contrib.*',)
)
]
))
self.children.append(modules.LinkList(
layout='inline',
children=(
{
'title': 'Python website',
'url': 'http://www.python.org',
'external': True,
'description': 'Python programming language rocks !',
},
['Django website', 'http://www.djangoproject.com', True],
['Some internal link', '/some/internal/link/'],
)
))