2011-06-23 15 views
1

私はdjango-admin-tools 0.4を使用しています。 docs hereに従って、私は3列のレイアウトを得ることができます。django-admin-tools 3列レイアウトが動作しません

私はページを3列分正しく配置することができましたが、モジュールは3列目に移動できません。

左の列から中央にドラッグできますが、右にはドラッグできません。

モジュールを3列間で移動させるにはどうすればよいですか?

My dashboard.py can be viewed here. 私はどのような結果が得られたかを示すスクリーンショットを添付しました。

enter image description here

答えて

0

主な問題は、(ほぼダッシュボードに作られているすべての変更のため。)切り捨てする必要が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/'], 
      ) 
     )) 
関連する問題