Django

Code

Changeset 5245

Show
Ignore:
Timestamp:
05/15/07 06:39:00 (1 year ago)
Author:
russellm
Message:

Fixed some documentation strings in django-admin, and updated the bash completion script.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management.py

    r5234 r5245  
    579579    load_data(['initial_data'], verbosity=verbosity) 
    580580syncdb.help_doc = "Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." 
    581 syncdb.args = '[--verbosity] [--interactive]' 
     581syncdb.args = '[--verbosity] [--noinput]' 
    582582 
    583583def get_admin_index(app): 
     
    673673        print "Reset cancelled." 
    674674reset.help_doc = "Executes ``sqlreset`` for the given app(s) in the current database." 
    675 reset.args = '[--interactive]' + APP_ARGS 
     675reset.args = '[--noinput]' + APP_ARGS 
    676676 
    677677def flush(verbosity=1, interactive=True): 
     
    734734        print "Flush cancelled." 
    735735flush.help_doc = "Executes ``sqlflush`` on the current database." 
    736 flush.args = '[--verbosity] [--interactive]' 
     736flush.args = '[--verbosity] [--noinput]' 
    737737 
    738738def _start_helper(app_or_project, name, directory, other_name=''): 
     
    14531453        sys.stderr.write(style.ERROR("Unable to serialize database: %s\n" % e)) 
    14541454dump_data.help_doc = 'Output the contents of the database as a fixture of the given format' 
    1455 dump_data.args = '[--format]' + APP_ARGS 
     1455dump_data.args = '[--format] [--indent]' + APP_ARGS 
    14561456 
    14571457# Utilities for command-line script 
  • django/trunk/extras/django_bash_completion

    r4677 r5245  
    4343 
    4444    # Standalone options 
    45     opts="--help --settings --pythonpath --version" 
     45    opts="--help --settings --pythonpath --noinput --noreload --format --indent --verbosity --adminmedia --version" 
    4646    # Actions 
    4747    actions="adminindex createcachetable dbshell diffsettings \ 
    48              inspectdb install reset runfcgi runserver \ 
    49              shell sql sqlall sqlclear sqlindexes sqlinitialdata
     48             dumpdata flush inspectdb loaddata reset runfcgi runserver \ 
     49             shell sql sqlall sqlclear sqlcustom sqlflush sqlindexes
    5050             sqlreset sqlsequencereset startapp startproject \ 
    51              syncdb validate" 
     51             syncdb test validate" 
    5252    # Action's options 
    5353    action_shell_opts="--plain" 
     
    8585    else 
    8686        case ${prev} in 
    87             adminindex|install|reset| \ 
    88             sql|sqlall|sqlclear|sqlindexes| \ 
    89             sqlinitialdata|sqlreset|sqlsequencereset) 
    90             # App completion 
    91             settings="" 
    92             # If settings.py in the PWD, use that 
    93             if [ -e settings.py ] ; then 
    94                 settings="$PWD/settings.py" 
    95             else 
    96                 # Use the ENV variable if it is set 
    97                 if [ $DJANGO_SETTINGS_MODULE ] ; then 
    98                     settings=$DJANGO_SETTINGS_MODULE 
     87            adminindex|dumpdata|reset| \ 
     88            sql|sqlall|sqlclear|sqlcustom|sqlindexes| \ 
     89            sqlreset|sqlsequencereset|test) 
     90                # App completion 
     91                settings="" 
     92                # If settings.py in the PWD, use that 
     93                if [ -e settings.py ] ; then 
     94                    settings="$PWD/settings.py" 
     95                else 
     96                    # Use the ENV variable if it is set 
     97                    if [ $DJANGO_SETTINGS_MODULE ] ; then 
     98                        settings=$DJANGO_SETTINGS_MODULE 
     99                    fi 
    99100                fi 
    100             fi 
    101             # Couldn't find settings so return nothing 
    102             if [ -z $settings ] ; then 
    103                 COMPREPLY=() 
    104             # Otherwise inspect settings.py file 
    105             else 
    106                 apps=`sed -n "/INSTALLED_APPS = (/,/)/p" $settings | \ 
    107                       grep -v "django.contrib" |  
    108                       sed -n "s/^[ ]*'\(.*\.\)*\(.*\)'.*$/\2 /pg" | \ 
    109                       tr -d "\n"` 
    110                 COMPREPLY=( $(compgen -W "${apps}" -- ${cur}) ) 
    111             fi 
    112             return 0 
    113             ;; 
     101                # Couldn't find settings so return nothing 
     102                if [ -z $settings ] ; then 
     103                    COMPREPLY=() 
     104                # Otherwise inspect settings.py file 
     105                else 
     106                    apps=`sed -n "/INSTALLED_APPS = (/,/)/p" $settings | \ 
     107                          grep -v "django.contrib" |  
     108                          sed -n "s/^[ ]*'\(.*\.\)*\(.*\)'.*$/\2 /pg" | \ 
     109                          tr -d "\n"` 
     110                    COMPREPLY=( $(compgen -W "${apps}" -- ${cur}) ) 
     111                fi 
     112                return 0 
     113                ;; 
    114114 
    115115            createcachetable|dbshell|diffsettings| \