Commits

Garth Johnson committed ca6753c

cmsplugins command output is sorted alphabetically

Comments (0)

Files changed (2)

djaboto/__init__.py

 # -*- coding: utf-8 -*-
-VERSION = (0,0,6,'alpha',1)
+VERSION = (0,0,6,'alpha',2)
 
 def get_version(version=None):
     """Derives a PEP386-compliant version number from VERSION."""

djaboto/management/commands/cmsplugins.py

         Shows all plugins that are available to this project, not just the ones that are already in use.
         """
         plugin_pool.discover_plugins()
+
+
         if options.get('verbosity',0):
-            print "%-35s %s %s MODEL" % ("PLUGIN", "TEXT ", "ADMIN")
-        for plugin in plugin_pool.plugins:
+            print "%-45s %s %s MODEL" % ("PLUGIN", "TEXT ", "ADMIN")
+        for plugin in sorted(plugin_pool.plugins.iterkeys()):
             if options.get('verbosity',0):
-                print "%-35s %-5s %-5s %s" % (
-                    plugin,
+                if plugin_pool.plugins[plugin].module:
+                    plugin_str = "%s (%s)" % (plugin, plugin_pool.plugins[plugin].module)
+                else:
+                    plugin_str = plugin
+                print "%-45s %-5s %-5s %s" % (
+                    plugin_str,
                     plugin_pool.plugins[plugin].text_enabled,
                     plugin_pool.plugins[plugin].admin_preview,
                     plugin_pool.plugins[plugin].model,