Updated man page for Django 2.2 alpha.
This commit is contained in:
parent
f84ad16ba4
commit
ba1a3c6034
|
@ -1,6 +1,6 @@
|
||||||
.\" Man page generated from reStructuredText.
|
.\" Man page generated from reStructuredText.
|
||||||
.
|
.
|
||||||
.TH "DJANGO-ADMIN" "1" "May 17, 2018" "2.1" "Django"
|
.TH "DJANGO-ADMIN" "1" "January 17, 2019" "2.2" "Django"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
django-admin \- Utility script for the Django Web framework
|
django-admin \- Utility script for the Django Web framework
|
||||||
.
|
.
|
||||||
|
@ -337,8 +337,6 @@ compare against Django\(aqs default settings.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-output {hash,unified}
|
.B \-\-output {hash,unified}
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Specifies the output format. Available values are \fBhash\fP and \fBunified\fP\&.
|
Specifies the output format. Available values are \fBhash\fP and \fBunified\fP\&.
|
||||||
\fBhash\fP is the default mode that displays the output that\(aqs described above.
|
\fBhash\fP is the default mode that displays the output that\(aqs described above.
|
||||||
|
@ -482,7 +480,8 @@ file) to standard output.
|
||||||
.sp
|
.sp
|
||||||
You may choose what tables or views to inspect by passing their names as
|
You may choose what tables or views to inspect by passing their names as
|
||||||
arguments. If no arguments are provided, models are created for views only if
|
arguments. If no arguments are provided, models are created for views only if
|
||||||
the \fI\%\-\-include\-views\fP option is used.
|
the \fI\%\-\-include\-views\fP option is used. Models for partition tables are
|
||||||
|
created on PostgreSQL if the \fI\%\-\-include\-partitions\fP option is used.
|
||||||
.sp
|
.sp
|
||||||
Use this if you have a legacy database with which you\(aqd like to use Django.
|
Use this if you have a legacy database with which you\(aqd like to use Django.
|
||||||
The script will inspect the database and create a model for each table within
|
The script will inspect the database and create a model for each table within
|
||||||
|
@ -515,13 +514,6 @@ you run it, you\(aqll want to look over the generated models yourself to make
|
||||||
customizations. In particular, you\(aqll need to rearrange models\(aq order, so that
|
customizations. In particular, you\(aqll need to rearrange models\(aq order, so that
|
||||||
models that refer to other models are ordered properly.
|
models that refer to other models are ordered properly.
|
||||||
.sp
|
.sp
|
||||||
Primary keys are automatically introspected for PostgreSQL, MySQL and
|
|
||||||
SQLite, in which case Django puts in the \fBprimary_key=True\fP where
|
|
||||||
needed.
|
|
||||||
.sp
|
|
||||||
\fBinspectdb\fP works with PostgreSQL, MySQL and SQLite. Foreign\-key detection
|
|
||||||
only works in PostgreSQL and with certain types of MySQL tables.
|
|
||||||
.sp
|
|
||||||
Django doesn\(aqt create database defaults when a
|
Django doesn\(aqt create database defaults when a
|
||||||
\fBdefault\fP is specified on a model field.
|
\fBdefault\fP is specified on a model field.
|
||||||
Similarly, database defaults aren\(aqt translated to model field defaults or
|
Similarly, database defaults aren\(aqt translated to model field defaults or
|
||||||
|
@ -533,6 +525,27 @@ 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 simply remove
|
||||||
it because \fBTrue\fP is its default value).
|
it because \fBTrue\fP is its default value).
|
||||||
|
.SS Database\-specific notes
|
||||||
|
.SS Oracle
|
||||||
|
.INDENT 0.0
|
||||||
|
.IP \(bu 2
|
||||||
|
Models are created for materialized views if \fI\%\-\-include\-views\fP is
|
||||||
|
used.
|
||||||
|
.UNINDENT
|
||||||
|
.SS PostgreSQL
|
||||||
|
.INDENT 0.0
|
||||||
|
.IP \(bu 2
|
||||||
|
Models are created for foreign tables.
|
||||||
|
.IP \(bu 2
|
||||||
|
Models are created for materialized views if
|
||||||
|
\fI\%\-\-include\-views\fP is used.
|
||||||
|
.IP \(bu 2
|
||||||
|
Models are created for partition tables if
|
||||||
|
\fI\%\-\-include\-partitions\fP is used.
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Support for foreign tables and materialized views was added.
|
||||||
|
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-database DATABASE
|
.B \-\-database DATABASE
|
||||||
|
@ -541,6 +554,16 @@ it because \fBTrue\fP is its default value).
|
||||||
Specifies the database to introspect. Defaults to \fBdefault\fP\&.
|
Specifies the database to introspect. Defaults to \fBdefault\fP\&.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-include\-partitions
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
If this option is provided, models are also created for partitions.
|
||||||
|
.sp
|
||||||
|
Only support for PostgreSQL is implemented.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
.B \-\-include\-views
|
.B \-\-include\-views
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
|
@ -578,8 +601,6 @@ Specifies a single app to look for fixtures in rather than looking in all apps.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-format FORMAT
|
.B \-\-format FORMAT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Specifies the serialization format (e.g.,
|
Specifies the serialization format (e.g.,
|
||||||
\fBjson\fP or \fBxml\fP) for fixtures \fI\%read from stdin\fP\&.
|
\fBjson\fP or \fBxml\fP) for fixtures \fI\%read from stdin\fP\&.
|
||||||
|
@ -769,8 +790,6 @@ defined, name the fixture \fBmydata.master.json\fP or
|
||||||
\fBmydata.master.json.gz\fP and the fixture will only be loaded when you
|
\fBmydata.master.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 \fBmaster\fP database.
|
||||||
.SS Loading fixtures from \fBstdin\fP
|
.SS Loading fixtures from \fBstdin\fP
|
||||||
.sp
|
|
||||||
|
|
||||||
.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
|
||||||
example:
|
example:
|
||||||
|
@ -816,8 +835,7 @@ the i18n documentation for details.
|
||||||
.sp
|
.sp
|
||||||
This command doesn\(aqt require configured settings. However, when settings aren\(aqt
|
This command doesn\(aqt require configured settings. However, when settings aren\(aqt
|
||||||
configured, the command can\(aqt ignore the \fBMEDIA_ROOT\fP and
|
configured, the command can\(aqt ignore the \fBMEDIA_ROOT\fP and
|
||||||
\fBSTATIC_ROOT\fP directories or include \fBLOCALE_PATHS\fP\&. It will
|
\fBSTATIC_ROOT\fP directories or include \fBLOCALE_PATHS\fP\&.
|
||||||
also write files in UTF\-8 rather than in \fBFILE_CHARSET\fP\&.
|
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-all, \-a
|
.B \-\-all, \-a
|
||||||
|
@ -963,8 +981,6 @@ understand each message\(aqs context.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-add\-location [{full,file,never}]
|
.B \-\-add\-location [{full,file,never}]
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Controls \fB#: filename:line\fP comment lines in language files. If the option
|
Controls \fB#: filename:line\fP comment lines in language files. If the option
|
||||||
is:
|
is:
|
||||||
|
@ -1046,7 +1062,16 @@ Enables fixing of migration conflicts.
|
||||||
.B \-\-name NAME, \-n NAME
|
.B \-\-name NAME, \-n NAME
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
Allows naming the generated migration(s) instead of using a generated name.
|
Allows naming the generated migration(s) instead of using a generated name. The
|
||||||
|
name must be a valid Python \fI\%identifier\fP\&.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-no\-header
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Generate migration files without Django version and timestamp header.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
.B \-\-check
|
.B \-\-check
|
||||||
|
@ -1113,6 +1138,15 @@ table names and so is only safe to use if you are confident that your existing
|
||||||
schema matches what is recorded in your initial migration.
|
schema matches what is recorded in your initial migration.
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
.B \-\-plan
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Shows the migration operations that will be performed for the given \fBmigrate\fP
|
||||||
|
command.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
.B \-\-run\-syncdb
|
.B \-\-run\-syncdb
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
.sp
|
||||||
|
@ -1154,11 +1188,24 @@ needed. You don\(aqt need to restart the server for code changes to take effect.
|
||||||
However, some actions like adding files don\(aqt trigger a restart, so you\(aqll
|
However, some actions like adding files don\(aqt trigger a restart, so you\(aqll
|
||||||
have to restart the server in these cases.
|
have to restart the server in these cases.
|
||||||
.sp
|
.sp
|
||||||
If you are using Linux and install \fI\%pyinotify\fP, kernel signals will be used to
|
If you\(aqre using Linux or MacOS and install both \fI\%pywatchman\fP and the
|
||||||
autoreload the server (rather than polling file modification timestamps each
|
\fI\%Watchman\fP service, kernel signals will be used to autoreload the server
|
||||||
second). This offers better scaling to large projects, reduction in response
|
(rather than polling file modification timestamps each second). This offers
|
||||||
time to code modification, more robust change detection, and battery usage
|
better performance on large projects, reduced response time after code changes,
|
||||||
reduction.
|
more robust change detection, and a reduction in power usage.
|
||||||
|
.INDENT 0.0
|
||||||
|
.INDENT 3.5
|
||||||
|
.IP "Large directories with many files may cause performance issues"
|
||||||
|
.sp
|
||||||
|
When using Watchman with a project that includes large non\-Python
|
||||||
|
directories like \fBnode_modules\fP, it\(aqs advisable to ignore this directory
|
||||||
|
for optimal performance. See the \fI\%watchman documentation\fP for information
|
||||||
|
on how to do this.
|
||||||
|
.UNINDENT
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
Watchman support replaced support for \fIpyinotify\fP\&.
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
When you start the server, and each time you change Python code while the
|
When you start the server, and each time you change Python code while the
|
||||||
server is running, the system check framework will check your entire Django
|
server is running, the system check framework will check your entire Django
|
||||||
|
@ -1578,11 +1625,17 @@ Suppresses all user prompts.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-squashed\-name SQUASHED_NAME
|
.B \-\-squashed\-name SQUASHED_NAME
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.sp
|
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
Sets the name of the squashed migration. When omitted, the name is based on the
|
Sets the name of the squashed migration. When omitted, the name is based on the
|
||||||
first and last migration, with \fB_squashed_\fP in between.
|
first and last migration, with \fB_squashed_\fP in between.
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-no\-header
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
Generate squashed migration file without Django version and timestamp header.
|
||||||
.SS \fBstartapp\fP
|
.SS \fBstartapp\fP
|
||||||
.INDENT 0.0
|
.INDENT 0.0
|
||||||
.TP
|
.TP
|
||||||
|
@ -2261,13 +2314,23 @@ django\-admin runserver \-\-no\-color
|
||||||
.fi
|
.fi
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
.UNINDENT
|
.UNINDENT
|
||||||
|
.INDENT 0.0
|
||||||
|
.TP
|
||||||
|
.B \-\-force\-color
|
||||||
|
.UNINDENT
|
||||||
|
.sp
|
||||||
|
|
||||||
|
.sp
|
||||||
|
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
|
||||||
|
colored output to another command.
|
||||||
.SH EXTRA NICETIES
|
.SH EXTRA NICETIES
|
||||||
.SS Syntax coloring
|
.SS Syntax coloring
|
||||||
.sp
|
.sp
|
||||||
The \fBdjango\-admin\fP / \fBmanage.py\fP commands will use pretty
|
The \fBdjango\-admin\fP / \fBmanage.py\fP commands will use pretty
|
||||||
color\-coded output if your terminal supports ANSI\-colored output. It
|
color\-coded output if your terminal supports ANSI\-colored output. It
|
||||||
won\(aqt use the color codes if you\(aqre piping the command\(aqs output to
|
won\(aqt use the color codes if you\(aqre piping the command\(aqs output to
|
||||||
another program.
|
another program unless the \fI\%\-\-force\-color\fP option is used.
|
||||||
.sp
|
.sp
|
||||||
Under Windows, the native console doesn\(aqt support ANSI escape sequences so by
|
Under Windows, the native console doesn\(aqt support ANSI escape sequences so by
|
||||||
default there is no color output. But you can install the \fI\%ANSICON\fP
|
default there is no color output. But you can install the \fI\%ANSICON\fP
|
||||||
|
|
Loading…
Reference in New Issue