A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/django-commons/django-click/issues/4 below:

None · Issue #4 · django-commons/django-click · GitHub

click==6.6, django-click==1.2.0, django==1.5.12

If the one required parameter is omitted from the following management command, the user sees the error message in the subject of this issue

import djclick as click

@click.command()
@click.argument('name')
def command(name):
   click.secho('Hello, {}'.format(name), fg='red')

If the one required parameter is omitted from the following command, the user sees a better error message.

import click

@click.command()
@click.argument('name')
def hello(name):
    click.secho('Hello, {}'.format(name), fg='red')

if __name__ == '__main__':
    hello()
$ python foo.py 
Usage: foo.py [OPTIONS] NAME

Error: Missing argument "name".

Any ideas? This would seem to be a django-click issue?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4