cms.management.commands.cms: 19 total statements, 0.0% covered

Generated: Wed 2013-03-13 10:33 CET

Source file: /media/Envs/Envs/filer-gallery/lib/python2.7/site-packages/cms/management/commands/cms.py

Stats: 0 executed, 12 missed, 7 excluded, 16 ignored

  1. # -*- coding: utf-8 -*-
  2. from __future__ import absolute_import
  3. from cms.management.commands.subcommands.base import SubcommandsCommand
  4. from cms.management.commands.subcommands.list import ListCommand
  5. from cms.management.commands.subcommands.moderator import ModeratorCommand
  6. from cms.management.commands.subcommands.uninstall import UninstallCommand
  7. from django.core.management.base import BaseCommand
  8. from optparse import make_option
  9. class Command(SubcommandsCommand):
  10. option_list = BaseCommand.option_list + (
  11. make_option('--noinput', action='store_false', dest='interactive', default=True,
  12. help='Tells django-cms to NOT prompt the user for input of any kind. '),
  13. )
  14. args = '<subcommand>'
  15. command_name = 'cms'
  16. subcommands = {
  17. 'uninstall': UninstallCommand,
  18. 'list': ListCommand,
  19. 'moderator': ModeratorCommand,
  20. }
  21. @property
  22. def help(self):
  23. lines = ['django CMS command line interface.', '', 'Available subcommands:']
  24. for subcommand in sorted(self.subcommands.keys()):
  25. lines.append(' %s' % subcommand)
  26. lines.append('')
  27. lines.append('Use `manage.py cms <subcommand> --help` for help about subcommands')
  28. return '\n'.join(lines)