Mikhail Korobov avatar Mikhail Korobov committed b4b2874

Example for custom AppIndexDashboard is fixed

Comments (0)

Files changed (3)

admin_tools/dashboard/dashboards.py

         from admin_tools.dashboard import modules, AppIndexDashboard
 
         class MyAppIndexDashboard(AppIndexDashboard):
-            def __init__(self, **kwargs):
-                AppIndexDashboard.__init__(self, **kwargs)
+            def __init__(self, app_title, models, **kwargs):
+                AppIndexDashboard.__init__(self, app_title, models, **kwargs)
                 # we don't want a title, it's redundant
                 self.title = ''
 

admin_tools/dashboard/templatetags/admin_tools_dashboard_tags.py

 def admin_tools_render_dashboard(context, location='index', dashboard=None):
     """
     Template tag that renders the dashboard, it takes two optional arguments:
-    
+
     ``location``
         The location of the dashboard, it can be 'index' (for the admin index
         dashboard) or 'app_index' (for the app index dashboard), the default
     """
     Template tag that renders the dashboard css files, it takes two optional
     arguments:
-    
+
     ``location``
         The location of the dashboard, it can be 'index' (for the admin index
         dashboard) or 'app_index' (for the app index dashboard), the default

admin_tools/tests.py

         self.assertNotDeprecated(modules.LinkList)
         self.assertNotDeprecated(modules.Feed)
 
-
     def test_menu(self):
         from admin_tools.menu import models
         self.assertDeprecated(models.Menu)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.