Changeset 5245
- Timestamp:
- 05/15/07 06:39:00 (1 year ago)
- Files:
-
- django/trunk/django/core/management.py (modified) (4 diffs)
- django/trunk/extras/django_bash_completion (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/core/management.py
r5234 r5245 579 579 load_data(['initial_data'], verbosity=verbosity) 580 580 syncdb.help_doc = "Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." 581 syncdb.args = '[--verbosity] [-- interactive]'581 syncdb.args = '[--verbosity] [--noinput]' 582 582 583 583 def get_admin_index(app): … … 673 673 print "Reset cancelled." 674 674 reset.help_doc = "Executes ``sqlreset`` for the given app(s) in the current database." 675 reset.args = '[-- interactive]' + APP_ARGS675 reset.args = '[--noinput]' + APP_ARGS 676 676 677 677 def flush(verbosity=1, interactive=True): … … 734 734 print "Flush cancelled." 735 735 flush.help_doc = "Executes ``sqlflush`` on the current database." 736 flush.args = '[--verbosity] [-- interactive]'736 flush.args = '[--verbosity] [--noinput]' 737 737 738 738 def _start_helper(app_or_project, name, directory, other_name=''): … … 1453 1453 sys.stderr.write(style.ERROR("Unable to serialize database: %s\n" % e)) 1454 1454 dump_data.help_doc = 'Output the contents of the database as a fixture of the given format' 1455 dump_data.args = '[--format] ' + APP_ARGS1455 dump_data.args = '[--format] [--indent]' + APP_ARGS 1456 1456 1457 1457 # Utilities for command-line script django/trunk/extras/django_bash_completion
r4677 r5245 43 43 44 44 # Standalone options 45 opts="--help --settings --pythonpath -- version"45 opts="--help --settings --pythonpath --noinput --noreload --format --indent --verbosity --adminmedia --version" 46 46 # Actions 47 47 actions="adminindex createcachetable dbshell diffsettings \ 48 inspectdb installreset runfcgi runserver \49 shell sql sqlall sqlclear sql indexes sqlinitialdata\48 dumpdata flush inspectdb loaddata reset runfcgi runserver \ 49 shell sql sqlall sqlclear sqlcustom sqlflush sqlindexes \ 50 50 sqlreset sqlsequencereset startapp startproject \ 51 syncdb validate"51 syncdb test validate" 52 52 # Action's options 53 53 action_shell_opts="--plain" … … 85 85 else 86 86 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 99 100 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 ;; 114 114 115 115 createcachetable|dbshell|diffsettings| \
