mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Updated man page for Django 4.1 alpha.
This commit is contained in:
		| @@ -1,6 +1,6 @@ | ||||
| .\" 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 | ||||
| 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 | ||||
| progress bar is shown in the terminal. | ||||
| .SS Fixtures compression | ||||
| .sp | ||||
|  | ||||
| .sp | ||||
| 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. | ||||
| @@ -542,7 +540,7 @@ django\-admin dumpdata \-o mydata.json.gz | ||||
| Removes all data from the database and re\-executes any post\-synchronization | ||||
| handlers. The table of which migrations have been applied is not cleared. | ||||
| .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. | ||||
| .INDENT 0.0 | ||||
| .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. | ||||
| .UNINDENT | ||||
| .UNINDENT | ||||
| .sp | ||||
| Support for XZ archives (\fB\&.xz\fP) and LZMA archives (\fB\&.lzma\fP) was added. | ||||
|  | ||||
| .SS Database\-specific fixtures | ||||
| .sp | ||||
| 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 | ||||
| situation, you can add a database identifier into the names of your fixtures. | ||||
| .sp | ||||
| For example, if your \fBDATABASES\fP setting has a \(aqmaster\(aq database | ||||
| 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. | ||||
| For example, if your \fBDATABASES\fP setting has a \(aqusers\(aq database | ||||
| defined, name the fixture \fBmydata.users.json\fP or | ||||
| \fBmydata.users.json.gz\fP and the fixture will only be loaded when you | ||||
| specify you want to load data into the \fBusers\fP database. | ||||
| .SS Loading fixtures from \fBstdin\fP | ||||
| .sp | ||||
| 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 | ||||
| Makes \fBmakemigrations\fP exit with a non\-zero status when model changes without | ||||
| migrations are detected. | ||||
| .INDENT 0.0 | ||||
| .TP | ||||
| .B \-\-scriptable | ||||
| .UNINDENT | ||||
| .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 | ||||
| .INDENT 0.0 | ||||
| .TP | ||||
| @@ -1264,6 +1263,35 @@ content types. | ||||
| .sp | ||||
| Makes \fBmigrate\fP exit with a non\-zero status when unapplied migrations are | ||||
| 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 | ||||
| .INDENT 0.0 | ||||
| .TP | ||||
| @@ -1815,7 +1843,7 @@ zip files, you can use a URL like: | ||||
| .sp | ||||
| .nf | ||||
| .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 | ||||
| .fi | ||||
| .UNINDENT | ||||
| @@ -2169,8 +2197,6 @@ as \fI\%unittest\(aqs \-\-buffer option\fP\&. | ||||
| .TP | ||||
| .B \-\-no\-faulthandler | ||||
| .UNINDENT | ||||
| .sp | ||||
|  | ||||
| .sp | ||||
| Django automatically calls \fI\%faulthandler.enable()\fP when starting the | ||||
| 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 | ||||
| .B \-\-timing | ||||
| .UNINDENT | ||||
| .sp | ||||
|  | ||||
| .sp | ||||
| Outputs timings, including database setup and total run time. | ||||
| .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 | ||||
| installation of \fBANSICON\fP by setting the appropriate environmental variable, | ||||
| \fBANSICON="on"\fP\&. | ||||
| .sp | ||||
| Updated support for syntax coloring on Windows. | ||||
|  | ||||
| .SS Custom colors | ||||
| .sp | ||||
| The colors used for syntax highlighting can be customized. Django | ||||
| @@ -2814,6 +2835,39 @@ with \fBsql\fP\&. | ||||
| .UNINDENT | ||||
| .sp | ||||
| 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 | ||||
| .TP | ||||
| .B django.core.management.call_command(name, *args, **options) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user