5 '--settings=-[the Python path to a settings module.]:file:_files'
6 '--pythonpath=-[a directory to add to the Python path.]::directory:_directories'
7 '--traceback[print traceback on exception.]'
8 "--version[show program's version number and exit.]"
9 {-h,--help}'[show this help message and exit.]'
12 _managepy
-adminindex(){
15 '*::directory:_directories' && ret
=0
18 _managepy
-createcachetable(){
28 _managepy
-diffsettings(){
35 '--format=-[specifies the output serialization format for fixtures.]:format:(json yaml xml)' \
36 '--indent=-[specifies the indent level to use when pretty-printing output.]:' \
38 '*::appname:_applist' && ret
=0
43 '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
44 '--noinput[tells Django to NOT prompt the user for input of any kind.]' \
50 '*:command:_managepy_cmds' \
57 _call_program
help-command .
/manage.py
help \
58 |& sed -n '/^ /s/[(), ]/ /gp' \
59 | while read -A line
; do cmd
=($line $cmd) done
60 _describe
-t managepy
-command 'manage.py command' cmd
63 _managepy
-inspectdb(){
70 '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
77 '--noinput[tells Django to NOT prompt the user for input of any kind.]' \
78 '*::appname:_applist' \
87 'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)'
88 'host[hostname to listen on..]:'
89 'port[port to listen on.]:'
90 'socket[UNIX socket to listen on.]::file:_files'
91 'method[prefork or threaded (default prefork)]:method:(prefork threaded)'
92 'maxrequests[number of requests a child handles before it is killed and a new child is forked (0 = no limit).]:'
93 'maxspare[max number of spare processes / threads.]:'
94 'minspare[min number of spare processes / threads.]:'
95 'maxchildren[hard limit number of processes / threads.]:'
96 'daemonize[whether to detach from terminal.]:boolean:(False True)'
97 'pidfile[write the spawned process-id to this file.]:file:_files'
98 'workdir[change to this directory when daemonizing.]:directory:_files'
99 'outlog[write stdout to this file.]:file:_files'
100 'errlog[write stderr to this file.]:file:_files'
105 '*: :_values "FCGI Setting" $fcgi_opts' && ret
=0
108 _managepy
-runserver(){
110 '--noreload[tells Django to NOT use the auto-reloader.]' \
111 '--adminmedia[specifies the directory from which to serve admin media.]:directory:_files' \
117 '--plain[tells Django to use plain Python, not IPython.]' \
123 _managepy
-sqlclear(){}
124 _managepy
-sqlcustom(){}
125 _managepy
-sqlflush(){}
126 _managepy
-sqlindexes(){}
127 _managepy
-sqlinitialdata(){}
128 _managepy
-sqlreset(){}
129 _managepy
-sqlsequencereset(){}
130 _managepy
-startapp(){}
134 '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
135 '--noinput[tells Django to NOT prompt the user for input of any kind.]' \
141 '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
142 '--noinput[tells Django to NOT prompt the user for input of any kind.]' \
143 '*::appname:_applist' \
147 _managepy
-testserver() {
149 '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \
150 '--addrport=-[port number or ipaddr:port to run the server on.]' \
151 '*::fixture:_files' \
155 _managepy
-validate() {
160 _managepy
-commands() {
164 'adminindex:prints the admin-index template snippet for the given app name(s).'
165 'createcachetable:creates the table needed to use the SQL cache backend.'
166 'dbshell:runs the command-line client for the current DATABASE_ENGINE.'
167 "diffsettings:displays differences between the current settings.py and Django's default settings."
168 'dumpdata:Output the contents of the database as a fixture of the given format.'
169 'flush:Executes ``sqlflush`` on the current database.'
170 'help:manage.py help.'
171 'inspectdb:Introspects the database tables in the given database and outputs a Django model module.'
172 'loaddata:Installs the named fixture(s) in the database.'
173 'reset:Executes ``sqlreset`` for the given app(s) in the current database.'
174 'runfcgi:Run this project as a fastcgi (or some other protocol supported by flup) application,'
175 'runserver:Starts a lightweight Web server for development.'
176 'shell:Runs a Python interactive interpreter.'
177 'sql:Prints the CREATE TABLE SQL statements for the given app name(s).'
178 'sqlall:Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for the given model module name(s).'
179 'sqlclear:Prints the DROP TABLE SQL statements for the given app name(s).'
180 'sqlcustom:Prints the custom table modifying SQL statements for the given app name(s).'
181 'sqlflush:Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed.'
182 'sqlindexes:Prints the CREATE INDEX SQL statements for the given model module name(s).'
183 "sqlinitialdata:RENAMED: see 'sqlcustom'"
184 'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).'
185 'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).'
186 "startapp:Creates a Django app directory structure for the given app name in this project's directory."
187 "syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
188 'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.'
189 'testserver:Runs a development server with data from the given fixture(s).'
190 'validate:Validates all installed models.'
193 _describe
-t commands
'manage.py command' commands
&& ret
=0
199 _call_program
help-command "python -c \"import os.path as op, re, django.conf, sys;\\
200 bn=op.basename(op.abspath(op.curdir));[sys\\
201 .stdout.write(str(re.sub(r'^%s\.(.*?)$' %
202 bn, r'\1', i)) + '\n') for i in django.conf.settings.\\
203 INSTALLED_APPS if re.match(r'^%s' % bn, i)]\"" \
204 | while read -A line
; do apps
=($line $apps) done
205 _values
'Application' $apps && ret
=0
209 local curcontext
=$curcontext ret
=1
211 if ((CURRENT
== 2)); then
216 curcontext
="${curcontext%:*:*}:managepy-$words[1]:"
217 _call_function ret _managepy
-$words[1]
221 compdef _managepy manage.py
222 compdef _managepy django
223 compdef _managepy django
-manage