diff --git a/docs/man/django-admin.1 b/docs/man/django-admin.1 index 8e0b5595ec..2f20f14fe7 100644 --- a/docs/man/django-admin.1 +++ b/docs/man/django-admin.1 @@ -1,6 +1,6 @@ .\" 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 django-admin \- Utility script for the Django Web framework . @@ -337,8 +337,6 @@ compare against Django\(aqs default settings. .TP .B \-\-output {hash,unified} .UNINDENT -.sp - .sp 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. @@ -482,7 +480,8 @@ file) to standard output. .sp 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 -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 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 @@ -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 models that refer to other models are ordered properly. .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 \fBdefault\fP is specified on a model field. 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 \fBmanaged\fP option to \fBTrue\fP (or simply remove 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 .TP .B \-\-database DATABASE @@ -541,6 +554,16 @@ it because \fBTrue\fP is its default value). Specifies the database to introspect. Defaults to \fBdefault\fP\&. .INDENT 0.0 .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 .UNINDENT .sp @@ -578,8 +601,6 @@ Specifies a single app to look for fixtures in rather than looking in all apps. .TP .B \-\-format FORMAT .UNINDENT -.sp - .sp Specifies the serialization format (e.g., \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 specify you want to load data into the \fBmaster\fP database. .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 example: @@ -816,8 +835,7 @@ the i18n documentation for details. .sp This command doesn\(aqt require configured settings. However, when settings aren\(aqt configured, the command can\(aqt ignore the \fBMEDIA_ROOT\fP and -\fBSTATIC_ROOT\fP directories or include \fBLOCALE_PATHS\fP\&. It will -also write files in UTF\-8 rather than in \fBFILE_CHARSET\fP\&. +\fBSTATIC_ROOT\fP directories or include \fBLOCALE_PATHS\fP\&. .INDENT 0.0 .TP .B \-\-all, \-a @@ -963,8 +981,6 @@ understand each message\(aqs context. .TP .B \-\-add\-location [{full,file,never}] .UNINDENT -.sp - .sp Controls \fB#: filename:line\fP comment lines in language files. If the option is: @@ -1046,7 +1062,16 @@ Enables fixing of migration conflicts. .B \-\-name NAME, \-n NAME .UNINDENT .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 .TP .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. .INDENT 0.0 .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 .UNINDENT .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 have to restart the server in these cases. .sp -If you are using Linux and install \fI\%pyinotify\fP, kernel signals will be used to -autoreload the server (rather than polling file modification timestamps each -second). This offers better scaling to large projects, reduction in response -time to code modification, more robust change detection, and battery usage -reduction. +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 +(rather than polling file modification timestamps each second). This offers +better performance on large projects, reduced response time after code changes, +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 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 @@ -1578,11 +1625,17 @@ Suppresses all user prompts. .TP .B \-\-squashed\-name SQUASHED_NAME .UNINDENT -.sp - .sp 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. +.INDENT 0.0 +.TP +.B \-\-no\-header +.UNINDENT +.sp + +.sp +Generate squashed migration file without Django version and timestamp header. .SS \fBstartapp\fP .INDENT 0.0 .TP @@ -2261,13 +2314,23 @@ django\-admin runserver \-\-no\-color .fi .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 .SS Syntax coloring .sp The \fBdjango\-admin\fP / \fBmanage.py\fP commands will use pretty 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 -another program. +another program unless the \fI\%\-\-force\-color\fP option is used. .sp 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