David Jean Louis avatar David Jean Louis committed e2732c0

Better docstring for AppList and ModelList modules

Comments (0)

Files changed (1)

admin_tools/dashboard/modules.py

 
     ``models``
         A list of models to include, only models whose name (e.g.
-        "blog.comments.Comment") match one of the strings (e.g. "blog.*")
+        "blog.comments.models.Comment") match one of the strings (e.g. "blog.*")
         in the models list will appear in the dashboard module.
 
     ``exclude``
         A list of models to exclude, if a model name (e.g.
-        "blog.comments.Comment") match an element of this list (e.g.
+        "blog.comments.models.Comment") match an element of this list (e.g.
         "blog.comments.*") it won't appear in the dashboard module.
 
     If no models/exclude list is provided, **all apps** are shown.
 
     ``models``
         A list of models to include, only models whose name (e.g.
-        "blog.comments.Comment") match one of the strings (e.g. "blog.*")
+        "blog.comments.models.Comment") match one of the strings (e.g. "blog.*")
         in the models list will appear in the dashboard module.
 
     ``exclude``
         A list of models to exclude, if a model name (e.g.
-        "blog.comments.Comment") match an element of this list (e.g.
+        "blog.comments.models.Comment") match an element of this list (e.g.
         "blog.comments.*") it won't appear in the dashboard module.
 
     Here's a small example of building a model list module::
 
                 # will only list the django.contrib.auth models
                 self.children += [
-                    modules.ModelList('Authentication', ['django.contrib.auth.*',])
+                    modules.ModelList(
+                        title='Authentication',
+                        models=['django.contrib.auth.*',]
+                    )
                 ]
 
     The screenshot of what this code produces:
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.