#31035: Promote BaseCommand.run_from_argv to a documented method
-------------------------------+--------------------------------------
Reporter: Roman Odaisky | Owner: nobody
Type: New feature | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Roman Odaisky):
Replying to [comment:1 Carlton Gibson]:
> I'd still point folks to overriding `handle()` as per the docs. In this
case just accessing `sys.argv` if that's what you need.
That was the first thing I tried, and unfortunately it doesn’t work
because the parser complains about unknown arguments. You can’t opt out of
argparse with the current management command machinery.
> That way we don't need multiple entry points and you can catch errors,
raising the expected `CommandError` appropriately.
In the use case of forwarding the arguments to another CLI, this isn’t
necessary at all.
Maybe another overridable method should be introduced between
run_from_argv() and handle()?
--
Ticket URL: <https://code.djangoproject.com/ticket/31035#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.8937078abfeb0d683ae1be96f9d1d391%40djangoproject.com.