mirror of https://github.com/django/django.git
Updated man page for Django 4.1 alpha.
This commit is contained in:
parent
d6e3756946
commit
5325a6344c
|
@ -1,6 +1,6 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "DJANGO-ADMIN" "1" "September 20, 2021" "4.0" "Django"
|
.TH "DJANGO-ADMIN" "1" "May 17, 2022" "4.1" "Django"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
django-admin \- Utility script for the Django web framework
|
django-admin \- Utility script for the Django web framework
|
||||||
.
|
.
|
||||||
|
@ -517,8 +517,6 @@ standard output.
|
||||||
When this option is set and \fB\-\-verbosity\fP is greater than 0 (the default), a
|
When this option is set and \fB\-\-verbosity\fP is greater than 0 (the default), a
|
||||||
progress bar is shown in the terminal.
|
progress bar is shown in the terminal.
|
||||||
.SS Fixtures compression
|
.SS Fixtures compression
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
The output file can be compressed with one of the \fBbz2\fP, \fBgz\fP, \fBlzma\fP, or
|
The output file can be compressed with one of the \fBbz2\fP, \fBgz\fP, \fBlzma\fP, or
|
||||||
\fBxz\fP formats by ending the filename with the corresponding extension.
|
\fBxz\fP formats by ending the filename with the corresponding extension.
|
||||||
|
@ -542,7 +540,7 @@ django\-admin dumpdata \-o mydata.json.gz
|
||||||
Removes all data from the database and re\-executes any post\-synchronization
|
Removes all data from the database and re\-executes any post\-synchronization
|
||||||
handlers. The table of which migrations have been applied is not cleared.
|
handlers. The table of which migrations have been applied is not cleared.
|
||||||
.sp
|
.sp
|
||||||
If you would rather start from an empty database and re\-run all migrations, you
|
If you would rather start from an empty database and rerun all migrations, you
|
||||||
should drop and recreate the database and then run \fI\%migrate\fP instead.
|
should drop and recreate the database and then run \fI\%migrate\fP instead.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -861,19 +859,16 @@ constraints, so if you use MyISAM, you won\(aqt get validation of fixture
|
||||||
data, or a rollback if multiple transaction files are found.
|
data, or a rollback if multiple transaction files are found.
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
Support for XZ archives (\fB\&.xz\fP) and LZMA archives (\fB\&.lzma\fP) was added.
|
|
||||||
|
|
||||||
.SS Database\-specific fixtures
|
.SS Database\-specific fixtures
|
||||||
.sp
|
.sp
|
||||||
If you\(aqre in a multi\-database setup, you might have fixture data that
|
If you\(aqre in a multi\-database setup, you might have fixture data that
|
||||||
you want to load onto one database, but not onto another. In this
|
you want to load onto one database, but not onto another. In this
|
||||||
situation, you can add a database identifier into the names of your fixtures.
|
situation, you can add a database identifier into the names of your fixtures.
|
||||||
.sp
|
.sp
|
||||||
For example, if your \fBDATABASES\fP setting has a \(aqmaster\(aq database
|
For example, if your \fBDATABASES\fP setting has a \(aqusers\(aq database
|
||||||
defined, name the fixture \fBmydata.master.json\fP or
|
defined, name the fixture \fBmydata.users.json\fP or
|
||||||
\fBmydata.master.json.gz\fP and the fixture will only be loaded when you
|
\fBmydata.users.json.gz\fP and the fixture will only be loaded when you
|
||||||
specify you want to load data into the \fBmaster\fP database.
|
specify you want to load data into the \fBusers\fP database.
|
||||||
.SS Loading fixtures from \fBstdin\fP
|
.SS Loading fixtures from \fBstdin\fP
|
||||||
.sp
|
.sp
|
||||||
You can use a dash as the fixture name to load input from \fBsys.stdin\fP\&. For
|
You can use a dash as the fixture name to load input from \fBsys.stdin\fP\&. For
|
||||||
|
@ -1162,11 +1157,15 @@ Generate migration files without Django version and timestamp header.
|
||||||
.sp
|
.sp
|
||||||
Makes \fBmakemigrations\fP exit with a non\-zero status when model changes without
|
Makes \fBmakemigrations\fP exit with a non\-zero status when model changes without
|
||||||
migrations are detected.
|
migrations are detected.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-scriptable
|
||||||
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Support for calling \fBmakemigrations\fP without an active database
|
|
||||||
connection was added. In that case, check for a consistent migration
|
|
||||||
history is skipped.
|
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Diverts log output and input prompts to \fBstderr\fP, writing only paths of
|
||||||
|
generated migration files to \fBstdout\fP\&.
|
||||||
.SS \fBmigrate\fP
|
.SS \fBmigrate\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -1264,6 +1263,35 @@ content types.
|
||||||
.sp
|
.sp
|
||||||
Makes \fBmigrate\fP exit with a non\-zero status when unapplied migrations are
|
Makes \fBmigrate\fP exit with a non\-zero status when unapplied migrations are
|
||||||
detected.
|
detected.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-prune
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Deletes nonexistent migrations from the \fBdjango_migrations\fP table. This is
|
||||||
|
useful when migration files replaced by a squashed migration have been removed.
|
||||||
|
See migration\-squashing for more details.
|
||||||
|
.SS \fBoptimizemigration\fP
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B django\-admin optimizemigration app_label migration_name
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Optimizes the operations for the named migration and overrides the existing
|
||||||
|
file. If the migration contains functions that must be manually copied, the
|
||||||
|
command creates a new migration file suffixed with \fB_optimized\fP that is meant
|
||||||
|
to replace the named migration.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-check
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Makes \fBoptimizemigration\fP exit with a non\-zero status when a migration can be
|
||||||
|
optimized.
|
||||||
.SS \fBrunserver\fP
|
.SS \fBrunserver\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -1815,7 +1843,7 @@ zip files, you can use a URL like:
|
||||||
.sp
|
.sp
|
||||||
.nf
|
.nf
|
||||||
.ft C
|
.ft C
|
||||||
django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-template/archive/master.zip myapp
|
django\-admin startapp \-\-template=https://github.com/githubuser/django\-app\-template/archive/main.zip myapp
|
||||||
.ft P
|
.ft P
|
||||||
.fi
|
.fi
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
@ -2169,8 +2197,6 @@ as \fI\%unittest\(aqs \-\-buffer option\fP\&.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-no\-faulthandler
|
.B \-\-no\-faulthandler
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Django automatically calls \fI\%faulthandler.enable()\fP when starting the
|
Django automatically calls \fI\%faulthandler.enable()\fP when starting the
|
||||||
tests, which allows it to print a traceback if the interpreter crashes. Pass
|
tests, which allows it to print a traceback if the interpreter crashes. Pass
|
||||||
|
@ -2179,8 +2205,6 @@ tests, which allows it to print a traceback if the interpreter crashes. Pass
|
||||||
.TP
|
.TP
|
||||||
.B \-\-timing
|
.B \-\-timing
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Outputs timings, including database setup and total run time.
|
Outputs timings, including database setup and total run time.
|
||||||
.SS \fBtestserver\fP
|
.SS \fBtestserver\fP
|
||||||
|
@ -2641,9 +2665,6 @@ Other modern terminal environments on Windows, that support terminal colors,
|
||||||
but which are not automatically detected as supported by Django, may "fake" the
|
but which are not automatically detected as supported by Django, may "fake" the
|
||||||
installation of \fBANSICON\fP by setting the appropriate environmental variable,
|
installation of \fBANSICON\fP by setting the appropriate environmental variable,
|
||||||
\fBANSICON="on"\fP\&.
|
\fBANSICON="on"\fP\&.
|
||||||
.sp
|
|
||||||
Updated support for syntax coloring on Windows.
|
|
||||||
|
|
||||||
.SS Custom colors
|
.SS Custom colors
|
||||||
.sp
|
.sp
|
||||||
The colors used for syntax highlighting can be customized. Django
|
The colors used for syntax highlighting can be customized. Django
|
||||||
|
@ -2814,6 +2835,39 @@ with \fBsql\fP\&.
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
See /howto/custom\-management\-commands for how to add customized actions.
|
See /howto/custom\-management\-commands for how to add customized actions.
|
||||||
|
.SS Black formatting
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
The Python files created by \fI\%startproject\fP, \fI\%startapp\fP,
|
||||||
|
\fI\%optimizemigration\fP, \fI\%makemigrations\fP, and
|
||||||
|
\fI\%squashmigrations\fP are formatted using the \fBblack\fP command if it is
|
||||||
|
present on your \fBPATH\fP\&.
|
||||||
|
.sp
|
||||||
|
If you have \fBblack\fP globally installed, but do not wish it used for the
|
||||||
|
current project, you can set the \fBPATH\fP explicitly:
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.ft C
|
||||||
|
PATH=path/to/venv/bin django\-admin makemigrations
|
||||||
|
.ft P
|
||||||
|
.fi
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
For commands using \fBstdout\fP you can pipe the output to \fBblack\fP if needed:
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.sp
|
||||||
|
.nf
|
||||||
|
.ft C
|
||||||
|
django\-admin inspectdb | black \-
|
||||||
|
.ft P
|
||||||
|
.fi
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B django.core.management.call_command(name, *args, **options)
|
.B django.core.management.call_command(name, *args, **options)
|
||||||
|
|
Loading…
Reference in New Issue