You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
I had this problem as well. Since argparse is used behind the scenes, I expected Option(..., nargs=argparse.REMAINDER) to do the trick. It looks fine in python manage.py mycommand -? but I still get the manage.py: error: too many arguments as well. Good to know the capture_all_args attribute works as well, but it's still a bit annoying.
By the way, it seems to work as:
class HelloCommand(Command):
capture_all_args = True
def run(self, allargs):
print 'Hello, the argument list was: ' + repr(allargs)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I want to achieve the following
and that throws
manage.py: error: too many arguments
Now I go through code and understand that it has to do with
capture_all_args
(which is not documented anywhere) and make itwhich works fine.
Can this be added to documentation, please?
The text was updated successfully, but these errors were encountered: