Ejemplo n.º 1
0
    def handle(self, *args, **options):
        verbosity = options.get('verbosity', 1)

        if len(args) < 2:
            print 'Arguments missing, specify app and tag library name(s)'
            return

        app_name = args[0]
        library_names = args[1:]

        if not app_name in sys.modules:
            print "Skipping app '%s': not in INSTALLED_APPS" % app_name
            return

        app_directory = get_app_directory(app_name)
        templatetag_directory = self._create_templatetag_structure(app_directory, verbosity)
        
        for library_name in library_names:
            self._create_library(templatetag_directory, library_name, verbosity)
Ejemplo n.º 2
0
    def handle(self, *args, **options):
        verbosity = options.get('verbosity', 1)
        
        if len(args) < 2:
            print 'Arguments missing, specify app and command name(s)'
            return

        app_name = args[0]
        command_names = args[1:]

        if not app_name in sys.modules:
            print "Skipping app '%s': not in INSTALLED_APPS" % app_name
            return

        app_directory = get_app_directory(app_name)
        commands_directory = self._create_management_structure(app_directory, verbosity)
        
        for command_name in command_names:
            self._create_command(commands_directory, command_name, verbosity)