#9715: r9110 introduced Backwards-Incompatible change
-------------------------------------+--------------------------------------
Reporter: telenieko | Owner: nobody
Status: closed | Milestone:
Component: Core framework | Version: SVN
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------+--------------------------------------
Comment (by russellm):
If the issue is maintaining source code compatibility with both trunk
(which has the change) and v1.0.X (which doesn't), there is a solution -
check whether --verbosity is available as an option before adding it. The
following code will allow you to maintain a single code base, but support
both branches:
{{{
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('--blah', action='store_false', dest='blah',
default=True),
)
if '--verbosity' not in [opt.get_opt_string() for opt in
BaseCommand.option_list]:
option_list += make_option('-v','--verbosity', action='store',
dest='verbosity', default='1',
type='choice', choices=['0', '1', '2'],
help='Verbosity level; 0=minimal output, 1=normal output,
2=all output'),
...
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9715#comment:2>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---