Hey Gang, I have to Command class below which utilizes args from the command line. I would like to have sub-arguments to some of these, e.g. python manage.py template3d -c --file some_template.html another.html
This would execute the [-c] parameter and also pass those html names to a [--file] option. It is proving very difficult to find answers on the net. class Command(BaseCommand): help='Coverts django templates for use with the Template3D system. Obfuscates and minimizes Javascript, CSS, and HTML' option_list = BaseCommand.option_list + ( make_option('-o', '--optimize', action='store_true', dest='optimize', default=False, help='Convert all templates in the into the templates3d format without any code minification.'), make_option('-c', '--compile', action='store_true', dest='closure', default=False, help='Compile all templates. (Includes minimizing: Javascript, CSS, and HTML).'), make_option('-u', '--unoptimize', action='store_true', dest='unoptimize', default=False, help='Reverts all templates to the non-optimized original version.'), make_option('-U', '--uncompile', action='store_true', dest='uncompile', default=False, help='Reverts all templates to the non-minimzed original version.'), make_option('-d', '--create-directories', action='store_true', dest='create', default=False, help='Automatically creates the directory structure contained in the STANDARD_TEMPLATE_DIRS to the TEMPLATE_DIRS.'), ) def handle(self, *args, **options): template_3d = template3d() if options['create']: template_3d.create_directories() I appreciate your time, Robert. -- Bust0ut, Surgemcgee: Systems Engineer --- surgemcgee.com BudTVNetwork.com RadioWeedShow.com "Bringing entertainment to Unix" -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.