~ubuntu-branches/ubuntu/quantal/python-django/quantal

« back to all changes in this revision

Viewing changes to django/core/management/base.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2009-07-29 11:26:28 UTC
  • mfrom: (1.1.8 upstream) (4.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20090729112628-pg09ino8sz0sj21t
Tags: 1.1-1
* New upstream release.
* Merge from experimental:
  - Ship FastCGI initscript and /etc/default file in python-django's examples
    directory (Closes: #538863)
  - Drop "05_10539-sphinx06-compatibility.diff"; it has been applied
    upstream.
  - Bump Standards-Version to 3.8.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
       output and, if the command is intended to produce a block of
74
74
       SQL statements, will be wrapped in ``BEGIN`` and ``COMMIT``.
75
75
 
76
 
    4. If ``handle()`` raised a ``ComandError``, ``execute()`` will
 
76
    4. If ``handle()`` raised a ``CommandError``, ``execute()`` will
77
77
       instead print an error message to ``stderr``.
78
78
 
79
79
    Thus, the ``handle()`` method is typically the starting point for
121
121
    """
122
122
    # Metadata about this command.
123
123
    option_list = (
 
124
        make_option('-v', '--verbosity', action='store', dest='verbosity', default='1',
 
125
            type='choice', choices=['0', '1', '2'],
 
126
            help='Verbosity level; 0=minimal output, 1=normal output, 2=all output'),
124
127
        make_option('--settings',
125
128
            help='The Python path to a settings module, e.g. "myproject.settings.main". If this isn\'t provided, the DJANGO_SETTINGS_MODULE environment variable will be used.'),
126
129
        make_option('--pythonpath',
209
212
                from django.utils import translation
210
213
                translation.activate('en-us')
211
214
            except ImportError, e:
212
 
                # If settings should be available, but aren't, 
 
215
                # If settings should be available, but aren't,
213
216
                # raise the error and quit.
214
217
                sys.stderr.write(self.style.ERROR(str('Error: %s\n' % e)))
215
218
                sys.exit(1)