mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #32309 -- Added --exclude option to startapp/startproject management commands.
This commit is contained in:
		| @@ -1304,6 +1304,14 @@ Specifies which files in the app template (in addition to those matching | ||||
| ``--extension``) should be rendered with the template engine. Defaults to an | ||||
| empty list. | ||||
|  | ||||
| .. django-admin-option:: --exclude DIRECTORIES, -x DIRECTORIES | ||||
|  | ||||
| .. versionadded:: 4.0 | ||||
|  | ||||
| Specifies which directories in the app template should be excluded, in addition | ||||
| to ``.git`` and ``__pycache__``. If this option is not provided, directories | ||||
| named ``__pycache__`` or starting with ``.`` will be excluded. | ||||
|  | ||||
| The :class:`template context <django.template.Context>` used for all matching | ||||
| files is: | ||||
|  | ||||
| @@ -1373,6 +1381,14 @@ Specifies which files in the project template (in addition to those matching | ||||
| ``--extension``) should be rendered with the template engine. Defaults to an | ||||
| empty list. | ||||
|  | ||||
| .. django-admin-option:: --exclude DIRECTORIES, -x DIRECTORIES | ||||
|  | ||||
| .. versionadded:: 4.0 | ||||
|  | ||||
| Specifies which directories in the project template should be excluded, in | ||||
| addition to ``.git`` and ``__pycache__``. If this option is not provided, | ||||
| directories named ``__pycache__`` or starting with ``.`` will be excluded. | ||||
|  | ||||
| The :class:`template context <django.template.Context>` used is: | ||||
|  | ||||
| - Any option passed to the ``startproject`` command (among the command's | ||||
|   | ||||
| @@ -278,6 +278,9 @@ Management Commands | ||||
|   <django.core.management.BaseCommand.suppressed_base_arguments>` attribute | ||||
|   allows suppressing unsupported default command options in the help output. | ||||
|  | ||||
| * The new :option:`startapp --exclude` and :option:`startproject --exclude` | ||||
|   options allow excluding directories from the template. | ||||
|  | ||||
| Migrations | ||||
| ~~~~~~~~~~ | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user