Updated man page for 3.0 alpha release.
This commit is contained in:
parent
34decdebf1
commit
513f137cfd
|
@ -1,6 +1,6 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "DJANGO-ADMIN" "1" "April 01, 2019" "2.2" "Django"
|
.TH "DJANGO-ADMIN" "1" "September 10, 2019" "3.0" "Django"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
django-admin \- Utility script for the Django Web framework
|
django-admin \- Utility script for the Django Web framework
|
||||||
.
|
.
|
||||||
|
@ -247,6 +247,27 @@ django\-admin compilemessages \-x pt_BR \-x fr
|
||||||
.fi
|
.fi
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-ignore PATTERN, \-i PATTERN
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Ignores directories matching the given \fI\%glob\fP\-style pattern. Use
|
||||||
|
multiple times to ignore more.
|
||||||
|
.sp
|
||||||
|
Example usage:
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.ft C
|
||||||
|
django\-admin compilemessages \-\-ignore=cache \-\-ignore=outdated/*/locale
|
||||||
|
.ft P
|
||||||
|
.fi
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
.SS \fBcreatecachetable\fP
|
.SS \fBcreatecachetable\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -290,7 +311,7 @@ For SQLite, this runs the \fBsqlite3\fP command\-line client.
|
||||||
For Oracle, this runs the \fBsqlplus\fP command\-line client.
|
For Oracle, this runs the \fBsqlplus\fP command\-line client.
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
This command assumes the programs are on your \fBPATH\fP so that a simple call to
|
This command assumes the programs are on your \fBPATH\fP so that a call to
|
||||||
the program name (\fBpsql\fP, \fBmysql\fP, \fBsqlite3\fP, \fBsqlplus\fP) will find the
|
the program name (\fBpsql\fP, \fBmysql\fP, \fBsqlite3\fP, \fBsqlplus\fP) will find the
|
||||||
program in the right place. There\(aqs no way to specify the location of the
|
program in the right place. There\(aqs no way to specify the location of the
|
||||||
program manually.
|
program manually.
|
||||||
|
@ -517,7 +538,7 @@ By default, \fBinspectdb\fP creates unmanaged models. That is, \fBmanaged = Fals
|
||||||
in the model\(aqs \fBMeta\fP class tells Django not to manage each table\(aqs creation,
|
in the model\(aqs \fBMeta\fP class tells Django not to manage each table\(aqs creation,
|
||||||
modification, and deletion. If you do want to allow Django to manage the
|
modification, and deletion. If you do want to allow Django to manage the
|
||||||
table\(aqs lifecycle, you\(aqll need to change the
|
table\(aqs lifecycle, you\(aqll need to change the
|
||||||
\fBmanaged\fP option to \fBTrue\fP (or simply remove
|
\fBmanaged\fP option to \fBTrue\fP (or remove
|
||||||
it because \fBTrue\fP is its default value).
|
it because \fBTrue\fP is its default value).
|
||||||
.SS Database\-specific notes
|
.SS Database\-specific notes
|
||||||
.SS Oracle
|
.SS Oracle
|
||||||
|
@ -560,8 +581,6 @@ Only support for PostgreSQL is implemented.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-include\-views
|
.B \-\-include\-views
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
If this option is provided, models are also created for database views.
|
If this option is provided, models are also created for database views.
|
||||||
.SS \fBloaddata\fP
|
.SS \fBloaddata\fP
|
||||||
|
@ -704,7 +723,7 @@ post_save.connect(my_handler, sender=MyModel)
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
You could also write a simple decorator to encapsulate this logic:
|
You could also write a decorator to encapsulate this logic:
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.INDENT 3.5
|
.INDENT 3.5
|
||||||
.sp
|
.sp
|
||||||
|
@ -1186,7 +1205,8 @@ If you\(aqre using Linux or MacOS and install both \fI\%pywatchman\fP and the
|
||||||
\fI\%Watchman\fP service, kernel signals will be used to autoreload the server
|
\fI\%Watchman\fP service, kernel signals will be used to autoreload the server
|
||||||
(rather than polling file modification timestamps each second). This offers
|
(rather than polling file modification timestamps each second). This offers
|
||||||
better performance on large projects, reduced response time after code changes,
|
better performance on large projects, reduced response time after code changes,
|
||||||
more robust change detection, and a reduction in power usage.
|
more robust change detection, and a reduction in power usage. Django supports
|
||||||
|
\fBpywatchman\fP 1.2.0 and higher.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.INDENT 3.5
|
.INDENT 3.5
|
||||||
.IP "Large directories with many files may cause performance issues"
|
.IP "Large directories with many files may cause performance issues"
|
||||||
|
@ -1197,6 +1217,14 @@ for optimal performance. See the \fI\%watchman documentation\fP for information
|
||||||
on how to do this.
|
on how to do this.
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.IP "Watchman timeout"
|
||||||
|
.sp
|
||||||
|
The default timeout of \fBWatchman\fP client is 5 seconds. You can change it
|
||||||
|
by setting the \fBDJANGO_WATCHMAN_TIMEOUT\fP environment variable.
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Watchman support replaced support for \fIpyinotify\fP\&.
|
Watchman support replaced support for \fIpyinotify\fP\&.
|
||||||
|
|
||||||
|
@ -1207,7 +1235,7 @@ project for some common errors (see the \fI\%check\fP command). If any
|
||||||
errors are found, they will be printed to standard output.
|
errors are found, they will be printed to standard output.
|
||||||
.sp
|
.sp
|
||||||
You can run as many concurrent servers as you want, as long as they\(aqre on
|
You can run as many concurrent servers as you want, as long as they\(aqre on
|
||||||
separate ports. Just execute \fBdjango\-admin runserver\fP more than once.
|
separate ports by executing \fBdjango\-admin runserver\fP more than once.
|
||||||
.sp
|
.sp
|
||||||
Note that the default IP address, \fB127.0.0.1\fP, is not accessible from other
|
Note that the default IP address, \fB127.0.0.1\fP, is not accessible from other
|
||||||
machines on your network. To make your development server viewable to other
|
machines on your network. To make your development server viewable to other
|
||||||
|
@ -1504,12 +1532,16 @@ Shows all migrations in a project. You can choose from one of two formats:
|
||||||
.sp
|
.sp
|
||||||
Lists all of the apps Django knows about, the migrations available for each
|
Lists all of the apps Django knows about, the migrations available for each
|
||||||
app, and whether or not each migration is applied (marked by an \fB[X]\fP next to
|
app, and whether or not each migration is applied (marked by an \fB[X]\fP next to
|
||||||
the migration name).
|
the migration name). For a \fB\-\-verbosity\fP of 2 and above, the applied
|
||||||
|
datetimes are also shown.
|
||||||
.sp
|
.sp
|
||||||
Apps without migrations are also listed, but have \fB(no migrations)\fP printed
|
Apps without migrations are also listed, but have \fB(no migrations)\fP printed
|
||||||
under them.
|
under them.
|
||||||
.sp
|
.sp
|
||||||
This is the default output format.
|
This is the default output format.
|
||||||
|
.sp
|
||||||
|
Output of the applied datetimes at verbosity 2 and above was added.
|
||||||
|
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-plan, \-p
|
.B \-\-plan, \-p
|
||||||
|
@ -1663,9 +1695,10 @@ django\-admin startapp myapp /Users/jezdez/Code/myapp
|
||||||
.B \-\-template TEMPLATE
|
.B \-\-template TEMPLATE
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Provides the path to a directory with a custom app template file or a path to a
|
Provides the path to a directory with a custom app template file, or a path to
|
||||||
compressed file (\fB\&.tar.gz\fP, \fB\&.tar.bz2\fP, \fB\&.tgz\fP, \fB\&.tbz\fP, \fB\&.zip\fP)
|
an uncompressed archive (\fB\&.tar\fP) or a compressed archive (\fB\&.tar.gz\fP,
|
||||||
containing the app template files.
|
\fB\&.tar.bz2\fP, \fB\&.tar.xz\fP, \fB\&.tar.lzma\fP, \fB\&.tgz\fP, \fB\&.tbz2\fP, \fB\&.txz\fP,
|
||||||
|
\fB\&.tlz\fP, \fB\&.zip\fP) containing the app template files.
|
||||||
.sp
|
.sp
|
||||||
For example, this would look for an app template in the given directory when
|
For example, this would look for an app template in the given directory when
|
||||||
creating the \fBmyapp\fP app:
|
creating the \fBmyapp\fP app:
|
||||||
|
@ -1696,6 +1729,10 @@ django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-t
|
||||||
.fi
|
.fi
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Support for XZ archives (\fB\&.tar.xz\fP, \fB\&.txz\fP) and LZMA archives
|
||||||
|
(\fB\&.tar.lzma\fP, \fB\&.tlz\fP) was added.
|
||||||
|
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-extension EXTENSIONS, \-e EXTENSIONS
|
.B \-\-extension EXTENSIONS, \-e EXTENSIONS
|
||||||
|
@ -1727,7 +1764,7 @@ options)
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBdocs_version\fP \-\- the version of the documentation: \fB\(aqdev\(aq\fP or \fB\(aq1.x\(aq\fP
|
\fBdocs_version\fP \-\- the version of the documentation: \fB\(aqdev\(aq\fP or \fB\(aq1.x\(aq\fP
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBdjango_version\fP \-\- the version of Django, e.g.\(ga\(ga\(aq2.0.3\(aq\(ga\(ga
|
\fBdjango_version\fP \-\- the version of Django, e.g. \fB\(aq2.0.3\(aq\fP
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
\fBWARNING:\fP
|
\fBWARNING:\fP
|
||||||
|
@ -1817,7 +1854,7 @@ supported options)
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBdocs_version\fP \-\- the version of the documentation: \fB\(aqdev\(aq\fP or \fB\(aq1.x\(aq\fP
|
\fBdocs_version\fP \-\- the version of the documentation: \fB\(aqdev\(aq\fP or \fB\(aq1.x\(aq\fP
|
||||||
.IP \(bu 2
|
.IP \(bu 2
|
||||||
\fBdjango_version\fP \-\- the version of Django, e.g.\(ga\(ga\(aq2.0.3\(aq\(ga\(ga
|
\fBdjango_version\fP \-\- the version of Django, e.g. \fB\(aq2.0.3\(aq\fP
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Please also see the \fI\%rendering warning\fP as mentioned
|
Please also see the \fI\%rendering warning\fP as mentioned
|
||||||
|
@ -1857,7 +1894,7 @@ The \fBtest\fP command receives options on behalf of the specified
|
||||||
\fBDiscoverRunner\fP\&.
|
\fBDiscoverRunner\fP\&.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-keepdb, \-k
|
.B \-\-keepdb
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Preserves the test database between test runs. This has the advantage of
|
Preserves the test database between test runs. This has the advantage of
|
||||||
|
@ -1916,7 +1953,7 @@ correctly:
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
.ft C
|
.ft C
|
||||||
$ pip install tblib
|
$ python \-m pip install tblib
|
||||||
.ft P
|
.ft P
|
||||||
.fi
|
.fi
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
@ -1956,6 +1993,31 @@ May be specified multiple times and combined with \fI\%test \-\-exclude\-tag\fP\
|
||||||
.sp
|
.sp
|
||||||
Excludes tests marked with the specified tags\&.
|
Excludes tests marked with the specified tags\&.
|
||||||
May be specified multiple times and combined with \fI\%test \-\-tag\fP\&.
|
May be specified multiple times and combined with \fI\%test \-\-tag\fP\&.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-k TEST_NAME_PATTERNS
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Runs test methods and classes matching test name patterns, in the same way as
|
||||||
|
\fI\%unittest\(aqs \-k option\fP\&. Can be specified multiple times.
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.IP "Python 3.7 and later"
|
||||||
|
.sp
|
||||||
|
This feature is only available for Python 3.7 and later.
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-pdb
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Spawns a \fBpdb\fP debugger at each test error or failure. If you have it
|
||||||
|
installed, \fBipdb\fP is used instead.
|
||||||
.SS \fBtestserver\fP
|
.SS \fBtestserver\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -2104,9 +2166,29 @@ useful if you need to create an initial superuser account or if you need to
|
||||||
programmatically generate superuser accounts for your site(s).
|
programmatically generate superuser accounts for your site(s).
|
||||||
.sp
|
.sp
|
||||||
When run interactively, this command will prompt for a password for
|
When run interactively, this command will prompt for a password for
|
||||||
the new superuser account. When run non\-interactively, no password
|
the new superuser account. When run non\-interactively, you can provide
|
||||||
will be set, and the superuser account will not be able to log in until
|
a password by setting the \fBDJANGO_SUPERUSER_PASSWORD\fP environment variable.
|
||||||
a password has been manually set for it.
|
Otherwise, no password will be set, and the superuser account will not be able
|
||||||
|
to log in until a password has been manually set for it.
|
||||||
|
.sp
|
||||||
|
In non\-interactive mode, the
|
||||||
|
\fBUSERNAME_FIELD\fP and required
|
||||||
|
fields (listed in
|
||||||
|
\fBREQUIRED_FIELDS\fP) fall back to
|
||||||
|
\fBDJANGO_SUPERUSER_<uppercase_field_name>\fP environment variables, unless they
|
||||||
|
are overridden by a command line argument. For example, to provide an \fBemail\fP
|
||||||
|
field, you can use \fBDJANGO_SUPERUSER_EMAIL\fP environment variable.
|
||||||
|
.sp
|
||||||
|
Support for using \fBDJANGO_SUPERUSER_PASSWORD\fP and
|
||||||
|
\fBDJANGO_SUPERUSER_<uppercase_field_name>\fP environment variables was added.
|
||||||
|
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-noinput, \-\-no\-input
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Suppresses all user prompts. If a suppressed prompt cannot be resolved
|
||||||
|
automatically, the command will exit with error code 1.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-username USERNAME
|
.B \-\-username USERNAME
|
||||||
|
@ -2244,7 +2326,7 @@ django\-admin migrate \-\-settings=mysite.settings
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Displays a full stack trace when a \fBCommandError\fP
|
Displays a full stack trace when a \fBCommandError\fP
|
||||||
is raised. By default, \fBdjango\-admin\fP will show a simple error message when a
|
is raised. By default, \fBdjango\-admin\fP will show an error message when a
|
||||||
\fBCommandError\fP occurs and a full stack trace for any other exception.
|
\fBCommandError\fP occurs and a full stack trace for any other exception.
|
||||||
.sp
|
.sp
|
||||||
Example usage:
|
Example usage:
|
||||||
|
@ -2317,6 +2399,29 @@ django\-admin runserver \-\-no\-color
|
||||||
Forces colorization of the command output if it would otherwise be disabled
|
Forces colorization of the command output if it would otherwise be disabled
|
||||||
as discussed in \fI\%Syntax coloring\fP\&. For example, you may want to pipe
|
as discussed in \fI\%Syntax coloring\fP\&. For example, you may want to pipe
|
||||||
colored output to another command.
|
colored output to another command.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-skip\-checks
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Skips running system checks prior to running the command. This option is only
|
||||||
|
available if the
|
||||||
|
\fBrequires_system_checks\fP command
|
||||||
|
attribute is set to \fBTrue\fP\&.
|
||||||
|
.sp
|
||||||
|
Example usage:
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.ft C
|
||||||
|
django\-admin migrate \-\-skip\-checks
|
||||||
|
.ft P
|
||||||
|
.fi
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
.SH EXTRA NICETIES
|
.SH EXTRA NICETIES
|
||||||
.SS Syntax coloring
|
.SS Syntax coloring
|
||||||
.sp
|
.sp
|
||||||
|
@ -2592,7 +2697,7 @@ support the \fBstdout\fP and \fBstderr\fP options. For example, you could write:
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
.ft C
|
.ft C
|
||||||
with open(\(aq/path/to/command_output\(aq) as f:
|
with open(\(aq/path/to/command_output\(aq, \(aqw\(aq) as f:
|
||||||
management.call_command(\(aqdumpdata\(aq, stdout=f)
|
management.call_command(\(aqdumpdata\(aq, stdout=f)
|
||||||
.ft P
|
.ft P
|
||||||
.fi
|
.fi
|
||||||
|
|
Loading…
Reference in New Issue