Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
eac9ab7e
Kaydet (Commit)
eac9ab7e
authored
Tem 02, 2018
tarafından
Claude Paroz
Kaydeden (comit)
Tim Graham
Tem 02, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed parser.add_arguments() arguments that match the defaults.
üst
4009e1f2
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
87 additions
and
90 deletions
+87
-90
changepassword.py
django/contrib/auth/management/commands/changepassword.py
+1
-1
createsuperuser.py
django/contrib/auth/management/commands/createsuperuser.py
+2
-3
remove_stale_contenttypes.py
...enttypes/management/commands/remove_stale_contenttypes.py
+1
-1
ogrinspect.py
django/contrib/gis/management/commands/ogrinspect.py
+8
-8
ping_google.py
django/contrib/sitemaps/management/commands/ping_google.py
+1
-1
collectstatic.py
.../contrib/staticfiles/management/commands/collectstatic.py
+3
-3
base.py
django/core/management/base.py
+2
-2
check.py
django/core/management/commands/check.py
+2
-3
compilemessages.py
django/core/management/commands/compilemessages.py
+2
-2
createcachetable.py
django/core/management/commands/createcachetable.py
+2
-2
dbshell.py
django/core/management/commands/dbshell.py
+1
-1
diffsettings.py
django/core/management/commands/diffsettings.py
+3
-3
dumpdata.py
django/core/management/commands/dumpdata.py
+5
-5
flush.py
django/core/management/commands/flush.py
+1
-1
inspectdb.py
django/core/management/commands/inspectdb.py
+2
-2
loaddata.py
django/core/management/commands/loaddata.py
+4
-4
makemessages.py
django/core/management/commands/makemessages.py
+10
-10
makemigrations.py
django/core/management/commands/makemigrations.py
+4
-4
migrate.py
django/core/management/commands/migrate.py
+4
-4
sendtestemail.py
django/core/management/commands/sendtestemail.py
+2
-2
shell.py
django/core/management/commands/shell.py
+3
-3
showmigrations.py
django/core/management/commands/showmigrations.py
+1
-1
sqlmigrate.py
django/core/management/commands/sqlmigrate.py
+1
-1
squashmigrations.py
django/core/management/commands/squashmigrations.py
+3
-3
test.py
django/core/management/commands/test.py
+2
-2
runner.py
django/test/runner.py
+7
-7
custom-management-commands.txt
docs/howto/custom-management-commands.txt
+0
-1
test_command.py
tests/bash_completion/management/commands/test_command.py
+1
-1
runtests.py
tests/runtests.py
+5
-5
runner.py
tests/test_runner/runner.py
+3
-3
hal.py
tests/user_commands/management/commands/hal.py
+1
-1
No files found.
django/contrib/auth/management/commands/changepassword.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -26,7 +26,7 @@ class Command(BaseCommand):
help
=
'Username to change password for; by default, it
\'
s the current username.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Specifies the database to use. Default is "default".'
,
)
...
...
django/contrib/auth/management/commands/createsuperuser.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -30,7 +30,6 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--
%
s'
%
self
.
UserModel
.
USERNAME_FIELD
,
dest
=
self
.
UserModel
.
USERNAME_FIELD
,
default
=
None
,
help
=
'Specifies the login for the superuser.'
,
)
parser
.
add_argument
(
...
...
@@ -44,13 +43,13 @@ class Command(BaseCommand):
),
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Specifies the database to use. Default is "default".'
,
)
for
field
in
self
.
UserModel
.
REQUIRED_FIELDS
:
parser
.
add_argument
(
'--
%
s'
%
field
,
dest
=
field
,
default
=
None
,
'--
%
s'
%
field
,
help
=
'Specifies the
%
s for the superuser.'
%
field
,
)
...
...
django/contrib/contenttypes/management/commands/remove_stale_contenttypes.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -15,7 +15,7 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates the database to use. Defaults to the "default" database.'
,
)
...
...
django/contrib/gis/management/commands/ogrinspect.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -43,21 +43,21 @@ class Command(BaseCommand):
parser
.
add_argument
(
'data_source'
,
help
=
'Path to the data source.'
)
parser
.
add_argument
(
'model_name'
,
help
=
'Name of the model to create.'
)
parser
.
add_argument
(
'--blank'
,
dest
=
'blank'
,
'--blank'
,
action
=
ListOptionAction
,
default
=
False
,
help
=
'Use a comma separated list of OGR field names to add '
'the `blank=True` option to the field definition. Set to `true` '
'to apply to all applicable fields.'
,
)
parser
.
add_argument
(
'--decimal'
,
dest
=
'decimal'
,
'--decimal'
,
action
=
ListOptionAction
,
default
=
False
,
help
=
'Use a comma separated list of OGR float fields to '
'generate `DecimalField` instead of the default '
'`FloatField`. Set to `true` to apply to all OGR float fields.'
,
)
parser
.
add_argument
(
'--geom-name'
,
de
st
=
'geom_name'
,
de
fault
=
'geom'
,
'--geom-name'
,
default
=
'geom'
,
help
=
'Specifies the model name for the Geometry Field (defaults to `geom`)'
)
parser
.
add_argument
(
...
...
@@ -68,11 +68,11 @@ class Command(BaseCommand):
'an integer or a string identifier for the layer.'
,
)
parser
.
add_argument
(
'--multi-geom'
,
action
=
'store_true'
,
dest
=
'multi_geom'
,
'--multi-geom'
,
action
=
'store_true'
,
help
=
'Treat the geometry in the data source as a geometry collection.'
,
)
parser
.
add_argument
(
'--name-field'
,
dest
=
'name_field'
,
'--name-field'
,
help
=
'Specifies a field name to return for the __str__() method.'
,
)
parser
.
add_argument
(
...
...
@@ -80,18 +80,18 @@ class Command(BaseCommand):
help
=
'Do not include `from django.contrib.gis.db import models` statement.'
,
)
parser
.
add_argument
(
'--null'
,
dest
=
'null'
,
action
=
ListOptionAction
,
default
=
False
,
'--null'
,
action
=
ListOptionAction
,
default
=
False
,
help
=
'Use a comma separated list of OGR field names to add '
'the `null=True` option to the field definition. Set to `true` '
'to apply to all applicable fields.'
,
)
parser
.
add_argument
(
'--srid'
,
dest
=
'srid'
,
'--srid'
,
help
=
'The SRID to use for the Geometry Field. If it can be '
'determined, the SRID of the data source is used.'
,
)
parser
.
add_argument
(
'--mapping'
,
action
=
'store_true'
,
dest
=
'mapping'
,
'--mapping'
,
action
=
'store_true'
,
help
=
'Generate mapping dictionary for use with `LayerMapping`.'
,
)
...
...
django/contrib/sitemaps/management/commands/ping_google.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -6,7 +6,7 @@ class Command(BaseCommand):
help
=
"Ping Google with an updated sitemap, pass optional url of sitemap"
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'sitemap_url'
,
nargs
=
'?'
,
default
=
None
)
parser
.
add_argument
(
'sitemap_url'
,
nargs
=
'?'
)
def
handle
(
self
,
*
args
,
**
options
):
ping_google
(
sitemap_url
=
options
[
'sitemap_url'
])
django/contrib/staticfiles/management/commands/collectstatic.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -51,16 +51,16 @@ class Command(BaseCommand):
"pattern. Use multiple times to ignore more."
,
)
parser
.
add_argument
(
'-n'
,
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry_run'
,
'-n'
,
'--dry-run'
,
action
=
'store_true'
,
help
=
"Do everything except modify the filesystem."
,
)
parser
.
add_argument
(
'-c'
,
'--clear'
,
action
=
'store_true'
,
dest
=
'clear'
,
'-c'
,
'--clear'
,
action
=
'store_true'
,
help
=
"Clear the existing files using the storage "
"before trying to copy or link the original file."
,
)
parser
.
add_argument
(
'-l'
,
'--link'
,
action
=
'store_true'
,
dest
=
'link'
,
'-l'
,
'--link'
,
action
=
'store_true'
,
help
=
"Create a symbolic link to each file instead of copying."
,
)
parser
.
add_argument
(
...
...
django/core/management/base.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -259,7 +259,7 @@ class BaseCommand:
)
parser
.
add_argument
(
'--version'
,
action
=
'version'
,
version
=
self
.
get_version
())
parser
.
add_argument
(
'-v'
,
'--verbosity'
,
action
=
'store'
,
dest
=
'verbosity'
,
default
=
1
,
'-v'
,
'--verbosity'
,
default
=
1
,
type
=
int
,
choices
=
[
0
,
1
,
2
,
3
],
help
=
'Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output'
,
)
...
...
@@ -277,7 +277,7 @@ class BaseCommand:
)
parser
.
add_argument
(
'--traceback'
,
action
=
'store_true'
,
help
=
'Raise on CommandError exceptions'
)
parser
.
add_argument
(
'--no-color'
,
action
=
'store_true'
,
dest
=
'no_color'
,
'--no-color'
,
action
=
'store_true'
,
help
=
"Don't colorize the command output."
,
)
self
.
add_arguments
(
parser
)
...
...
django/core/management/commands/check.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -16,18 +16,17 @@ class Command(BaseCommand):
help
=
'Run only checks labeled with given tag.'
,
)
parser
.
add_argument
(
'--list-tags'
,
action
=
'store_true'
,
dest
=
'list_tags'
,
'--list-tags'
,
action
=
'store_true'
,
help
=
'List available tags.'
,
)
parser
.
add_argument
(
'--deploy'
,
action
=
'store_true'
,
dest
=
'deploy'
,
'--deploy'
,
action
=
'store_true'
,
help
=
'Check deployment settings.'
,
)
parser
.
add_argument
(
'--fail-level'
,
default
=
'ERROR'
,
choices
=
[
'CRITICAL'
,
'ERROR'
,
'WARNING'
,
'INFO'
,
'DEBUG'
],
dest
=
'fail_level'
,
help
=
(
'Message level that will cause the command to exit with a '
'non-zero status. Default is ERROR.'
...
...
django/core/management/commands/compilemessages.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -34,12 +34,12 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--locale'
,
'-l'
,
dest
=
'locale'
,
action
=
'append'
,
default
=
[],
'--locale'
,
'-l'
,
action
=
'append'
,
default
=
[],
help
=
'Locale(s) to process (e.g. de_AT). Default is to process all. '
'Can be used multiple times.'
,
)
parser
.
add_argument
(
'--exclude'
,
'-x'
,
dest
=
'exclude'
,
action
=
'append'
,
default
=
[],
'--exclude'
,
'-x'
,
action
=
'append'
,
default
=
[],
help
=
'Locales to exclude. Default is none. Can be used multiple times.'
,
)
parser
.
add_argument
(
...
...
django/core/management/commands/createcachetable.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -19,13 +19,13 @@ class Command(BaseCommand):
help
=
'Optional table names. Otherwise, settings.CACHES is used to find cache tables.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database onto which the cache tables will be '
'installed. Defaults to the "default" database.'
,
)
parser
.
add_argument
(
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry_run'
,
'--dry-run'
,
action
=
'store_true'
,
help
=
'Does not create the table, just prints the SQL that would be run.'
,
)
...
...
django/core/management/commands/dbshell.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -12,7 +12,7 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database onto which to open a shell. Defaults to the "default" database.'
,
)
...
...
django/core/management/commands/diffsettings.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -14,21 +14,21 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--all'
,
action
=
'store_true'
,
dest
=
'all'
,
'--all'
,
action
=
'store_true'
,
help
=
(
'Display all settings, regardless of their value. In "hash" '
'mode, default values are prefixed by "###".'
),
)
parser
.
add_argument
(
'--default'
,
dest
=
'default'
,
metavar
=
'MODULE'
,
default
=
None
,
'--default'
,
metavar
=
'MODULE'
,
help
=
(
"The settings module to compare the current settings against. Leave empty to "
"compare against Django's default settings."
),
)
parser
.
add_argument
(
'--output'
,
default
=
'hash'
,
choices
=
(
'hash'
,
'unified'
),
dest
=
'output'
,
'--output'
,
default
=
'hash'
,
choices
=
(
'hash'
,
'unified'
),
help
=
(
"Selects the output format. 'hash' mode displays each changed "
"setting, with the settings that don't appear in the defaults "
...
...
django/core/management/commands/dumpdata.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -24,21 +24,21 @@ class Command(BaseCommand):
help
=
'Restricts dumped data to the specified app_label or app_label.ModelName.'
,
)
parser
.
add_argument
(
'--format'
,
default
=
'json'
,
dest
=
'format'
,
'--format'
,
default
=
'json'
,
help
=
'Specifies the output serialization format for fixtures.'
,
)
parser
.
add_argument
(
'--indent'
,
default
=
None
,
dest
=
'indent'
,
type
=
int
,
'--indent'
,
type
=
int
,
help
=
'Specifies the indent level to use when pretty-printing output.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a specific database to dump fixtures from. '
'Defaults to the "default" database.'
,
)
parser
.
add_argument
(
'-e'
,
'--exclude'
,
dest
=
'exclude'
,
action
=
'append'
,
default
=
[],
'-e'
,
'--exclude'
,
action
=
'append'
,
default
=
[],
help
=
'An app_label or app_label.ModelName to exclude '
'(use multiple --exclude to exclude multiple apps/models).'
,
)
...
...
@@ -61,7 +61,7 @@ class Command(BaseCommand):
"list of keys. This option only works when you specify one model."
,
)
parser
.
add_argument
(
'-o'
,
'--output'
,
default
=
None
,
dest
=
'output'
,
'-o'
,
'--output'
,
help
=
'Specifies file to which the output is written.'
)
...
...
django/core/management/commands/flush.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -20,7 +20,7 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database to flush. Defaults to the "default" database.'
,
)
...
...
django/core/management/commands/inspectdb.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -15,11 +15,11 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'table'
,
action
=
'store'
,
nargs
=
'*'
,
type
=
str
,
'table'
,
nargs
=
'*'
,
type
=
str
,
help
=
'Selects what tables or views should be introspected.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database to introspect. Defaults to using the "default" database.'
,
)
parser
.
add_argument
(
...
...
django/core/management/commands/loaddata.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -39,11 +39,11 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'args'
,
metavar
=
'fixture'
,
nargs
=
'+'
,
help
=
'Fixture labels.'
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a specific database to load fixtures into. Defaults to the "default" database.'
,
)
parser
.
add_argument
(
'--app'
,
action
=
'store'
,
dest
=
'app_label'
,
default
=
None
,
'--app'
,
dest
=
'app_label'
,
help
=
'Only look for fixtures in the specified app.'
,
)
parser
.
add_argument
(
...
...
@@ -52,11 +52,11 @@ class Command(BaseCommand):
'currently exist on the model.'
,
)
parser
.
add_argument
(
'-e'
,
'--exclude'
,
dest
=
'exclude'
,
action
=
'append'
,
default
=
[],
'-e'
,
'--exclude'
,
action
=
'append'
,
default
=
[],
help
=
'An app_label or app_label.ModelName to exclude. Can be used multiple times.'
,
)
parser
.
add_argument
(
'--format'
,
action
=
'store'
,
dest
=
'format'
,
default
=
None
,
'--format'
,
help
=
'Format of serialized data when reading from stdin.'
,
)
...
...
django/core/management/commands/makemessages.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -216,20 +216,20 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--locale'
,
'-l'
,
default
=
[],
dest
=
'locale'
,
action
=
'append'
,
'--locale'
,
'-l'
,
default
=
[],
action
=
'append'
,
help
=
'Creates or updates the message files for the given locale(s) (e.g. pt_BR). '
'Can be used multiple times.'
,
)
parser
.
add_argument
(
'--exclude'
,
'-x'
,
default
=
[],
dest
=
'exclude'
,
action
=
'append'
,
'--exclude'
,
'-x'
,
default
=
[],
action
=
'append'
,
help
=
'Locales to exclude. Default is none. Can be used multiple times.'
,
)
parser
.
add_argument
(
'--domain'
,
'-d'
,
default
=
'django'
,
dest
=
'domain'
,
'--domain'
,
'-d'
,
default
=
'django'
,
help
=
'The domain of the message files (default: "django").'
,
)
parser
.
add_argument
(
'--all'
,
'-a'
,
action
=
'store_true'
,
dest
=
'all'
,
'--all'
,
'-a'
,
action
=
'store_true'
,
help
=
'Updates the message files for all existing locales.'
,
)
parser
.
add_argument
(
...
...
@@ -239,7 +239,7 @@ class Command(BaseCommand):
'commas, or use -e multiple times.'
,
)
parser
.
add_argument
(
'--symlinks'
,
'-s'
,
action
=
'store_true'
,
dest
=
'symlinks'
,
'--symlinks'
,
'-s'
,
action
=
'store_true'
,
help
=
'Follows symlinks to directories when examining source code '
'and templates for translation strings.'
,
)
...
...
@@ -254,15 +254,15 @@ class Command(BaseCommand):
help
=
"Don't ignore the common glob-style patterns 'CVS', '.*', '*~' and '*.pyc'."
,
)
parser
.
add_argument
(
'--no-wrap'
,
action
=
'store_true'
,
dest
=
'no_wrap'
,
'--no-wrap'
,
action
=
'store_true'
,
help
=
"Don't break long message lines into several lines."
,
)
parser
.
add_argument
(
'--no-location'
,
action
=
'store_true'
,
dest
=
'no_location'
,
'--no-location'
,
action
=
'store_true'
,
help
=
"Don't write '#: filename:line' lines."
,
)
parser
.
add_argument
(
'--add-location'
,
dest
=
'add_location'
,
'--add-location'
,
choices
=
(
'full'
,
'file'
,
'never'
),
const
=
'full'
,
nargs
=
'?'
,
help
=
(
"Controls '#: filename:line' lines. If the option is 'full' "
...
...
@@ -273,11 +273,11 @@ class Command(BaseCommand):
),
)
parser
.
add_argument
(
'--no-obsolete'
,
action
=
'store_true'
,
dest
=
'no_obsolete'
,
'--no-obsolete'
,
action
=
'store_true'
,
help
=
"Remove obsolete message strings."
,
)
parser
.
add_argument
(
'--keep-pot'
,
action
=
'store_true'
,
dest
=
'keep_pot'
,
'--keep-pot'
,
action
=
'store_true'
,
help
=
"Keep .pot file after making messages. Useful when debugging."
,
)
...
...
django/core/management/commands/makemigrations.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -29,15 +29,15 @@ class Command(BaseCommand):
help
=
'Specify the app label(s) to create migrations for.'
,
)
parser
.
add_argument
(
'--dry-run'
,
action
=
'store_true'
,
dest
=
'dry_run'
,
'--dry-run'
,
action
=
'store_true'
,
help
=
"Just show what migrations would be made; don't actually write them."
,
)
parser
.
add_argument
(
'--merge'
,
action
=
'store_true'
,
dest
=
'merge'
,
'--merge'
,
action
=
'store_true'
,
help
=
"Enable fixing of migration conflicts."
,
)
parser
.
add_argument
(
'--empty'
,
action
=
'store_true'
,
dest
=
'empty'
,
'--empty'
,
action
=
'store_true'
,
help
=
"Create an empty migration."
,
)
parser
.
add_argument
(
...
...
@@ -45,7 +45,7 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'-n'
,
'--name'
,
action
=
'store'
,
dest
=
'name'
,
default
=
None
,
'-n'
,
'--name'
,
help
=
"Use this name for migration file(s)."
,
)
parser
.
add_argument
(
...
...
django/core/management/commands/migrate.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -36,22 +36,22 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database to synchronize. Defaults to the "default" database.'
,
)
parser
.
add_argument
(
'--fake'
,
action
=
'store_true'
,
dest
=
'fake'
,
'--fake'
,
action
=
'store_true'
,
help
=
'Mark migrations as run without actually running them.'
,
)
parser
.
add_argument
(
'--fake-initial'
,
action
=
'store_true'
,
dest
=
'fake_initial'
,
'--fake-initial'
,
action
=
'store_true'
,
help
=
'Detect if tables already exist and fake-apply initial migrations if so. Make sure '
'that the current database schema matches your initial migration before using this '
'flag. Django will only check for an existing table name.'
,
)
parser
.
add_argument
(
'--run-syncdb'
,
action
=
'store_true'
,
dest
=
'run_syncdb'
,
'--run-syncdb'
,
action
=
'store_true'
,
help
=
'Creates tables for apps without migrations.'
,
)
...
...
django/core/management/commands/sendtestemail.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -15,11 +15,11 @@ class Command(BaseCommand):
help
=
'One or more email addresses to send a test email to.'
,
)
parser
.
add_argument
(
'--managers'
,
action
=
'store_true'
,
dest
=
'managers'
,
'--managers'
,
action
=
'store_true'
,
help
=
'Send a test email to the addresses specified in settings.MANAGERS.'
,
)
parser
.
add_argument
(
'--admins'
,
action
=
'store_true'
,
dest
=
'admins'
,
'--admins'
,
action
=
'store_true'
,
help
=
'Send a test email to the addresses specified in settings.ADMINS.'
,
)
...
...
django/core/management/commands/shell.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -19,15 +19,15 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'--no-startup'
,
action
=
'store_true'
,
dest
=
'no_startup'
,
'--no-startup'
,
action
=
'store_true'
,
help
=
'When using plain Python, ignore the PYTHONSTARTUP environment variable and ~/.pythonrc.py script.'
,
)
parser
.
add_argument
(
'-i'
,
'--interface'
,
choices
=
self
.
shells
,
dest
=
'interface'
,
'-i'
,
'--interface'
,
choices
=
self
.
shells
,
help
=
'Specify an interactive interpreter interface. Available options: "ipython", "bpython", and "python"'
,
)
parser
.
add_argument
(
'-c'
,
'--command'
,
dest
=
'command'
,
'-c'
,
'--command'
,
help
=
'Instead of opening an interactive shell, run a command as Django and exit.'
,
)
...
...
django/core/management/commands/showmigrations.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -12,7 +12,7 @@ class Command(BaseCommand):
help
=
'App labels of applications to limit the output to.'
,
)
parser
.
add_argument
(
'--database'
,
action
=
'store'
,
dest
=
'database'
,
default
=
DEFAULT_DB_ALIAS
,
'--database'
,
default
=
DEFAULT_DB_ALIAS
,
help
=
'Nominates a database to synchronize. Defaults to the "default" database.'
,
)
...
...
django/core/management/commands/sqlmigrate.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -18,7 +18,7 @@ class Command(BaseCommand):
help
=
'Nominates a database to create SQL for. Defaults to the "default" database.'
,
)
parser
.
add_argument
(
'--backwards'
,
action
=
'store_true'
,
dest
=
'backwards'
,
'--backwards'
,
action
=
'store_true'
,
help
=
'Creates SQL to unapply the migration, rather than to apply it'
,
)
...
...
django/core/management/commands/squashmigrations.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -18,7 +18,7 @@ class Command(BaseCommand):
help
=
'App label of the application to squash migrations for.'
,
)
parser
.
add_argument
(
'start_migration_name'
,
default
=
None
,
nargs
=
'?'
,
'start_migration_name'
,
nargs
=
'?'
,
help
=
'Migrations will be squashed starting from and including this migration.'
,
)
parser
.
add_argument
(
...
...
@@ -26,7 +26,7 @@ class Command(BaseCommand):
help
=
'Migrations will be squashed until and including this migration.'
,
)
parser
.
add_argument
(
'--no-optimize'
,
action
=
'store_true'
,
dest
=
'no_optimize'
,
'--no-optimize'
,
action
=
'store_true'
,
help
=
'Do not try to optimize the squashed operations.'
,
)
parser
.
add_argument
(
...
...
@@ -34,7 +34,7 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--squashed-name'
,
dest
=
'squashed_name'
,
'--squashed-name'
,
help
=
'Sets the name of the new squashed migration.'
,
)
...
...
django/core/management/commands/test.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -35,11 +35,11 @@ class Command(BaseCommand):
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--failfast'
,
action
=
'store_true'
,
dest
=
'failfast'
,
'--failfast'
,
action
=
'store_true'
,
help
=
'Tells Django to stop running the test suite after first failed test.'
,
)
parser
.
add_argument
(
'--testrunner'
,
action
=
'store'
,
dest
=
'testrunner'
,
'--testrunner'
,
help
=
'Tells Django to use specified test runner class instead of '
'the one specified by the TEST_RUNNER setting.'
,
)
...
...
django/test/runner.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -422,31 +422,31 @@ class DiscoverRunner:
@classmethod
def
add_arguments
(
cls
,
parser
):
parser
.
add_argument
(
'-t'
,
'--top-level-directory'
,
action
=
'store'
,
dest
=
'top_level'
,
default
=
None
,
'-t'
,
'--top-level-directory'
,
dest
=
'top_level'
,
help
=
'Top level of project for unittest discovery.'
,
)
parser
.
add_argument
(
'-p'
,
'--pattern'
,
action
=
'store'
,
dest
=
'pattern'
,
default
=
"test*.py"
,
'-p'
,
'--pattern'
,
default
=
"test*.py"
,
help
=
'The test matching pattern. Defaults to test*.py.'
,
)
parser
.
add_argument
(
'-k'
,
'--keepdb'
,
action
=
'store_true'
,
dest
=
'keepdb'
,
'-k'
,
'--keepdb'
,
action
=
'store_true'
,
help
=
'Preserves the test DB between runs.'
)
parser
.
add_argument
(
'-r'
,
'--reverse'
,
action
=
'store_true'
,
dest
=
'reverse'
,
'-r'
,
'--reverse'
,
action
=
'store_true'
,
help
=
'Reverses test cases order.'
,
)
parser
.
add_argument
(
'--debug-mode'
,
action
=
'store_true'
,
dest
=
'debug_mode'
,
'--debug-mode'
,
action
=
'store_true'
,
help
=
'Sets settings.DEBUG to True.'
,
)
parser
.
add_argument
(
'-d'
,
'--debug-sql'
,
action
=
'store_true'
,
dest
=
'debug_sql'
,
'-d'
,
'--debug-sql'
,
action
=
'store_true'
,
help
=
'Prints logged SQL queries on failure.'
,
)
parser
.
add_argument
(
'--parallel'
,
dest
=
'parallel'
,
nargs
=
'?'
,
default
=
1
,
type
=
int
,
'--parallel'
,
nargs
=
'?'
,
default
=
1
,
type
=
int
,
const
=
default_test_processes
(),
metavar
=
'N'
,
help
=
'Run tests using up to N parallel processes.'
,
)
...
...
docs/howto/custom-management-commands.txt
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -103,7 +103,6 @@ options can be added in the :meth:`~BaseCommand.add_arguments` method like this:
parser.add_argument(
'--delete',
action='store_true',
dest='delete',
help='Delete poll instead of closing it',
)
...
...
tests/bash_completion/management/commands/test_command.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -3,7 +3,7 @@ from django.core.management.base import BaseCommand
class
Command
(
BaseCommand
):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
"--list"
,
action
=
"store_true"
,
dest
=
"list"
,
help
=
"Print all options"
)
parser
.
add_argument
(
"--list"
,
action
=
"store_true"
,
help
=
"Print all options"
)
def
handle
(
self
,
*
args
,
**
options
):
pass
tests/runtests.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -405,11 +405,11 @@ if __name__ == "__main__":
help
=
'Tells Django to NOT prompt the user for input of any kind.'
,
)
parser
.
add_argument
(
'--failfast'
,
action
=
'store_true'
,
dest
=
'failfast'
,
'--failfast'
,
action
=
'store_true'
,
help
=
'Tells Django to stop running the test suite after first failed test.'
,
)
parser
.
add_argument
(
'-k'
,
'--keepdb'
,
action
=
'store_true'
,
dest
=
'keepdb'
,
'-k'
,
'--keepdb'
,
action
=
'store_true'
,
help
=
'Tells Django to preserve the test database between runs.'
,
)
parser
.
add_argument
(
...
...
@@ -433,15 +433,15 @@ if __name__ == "__main__":
'test side effects not apparent with normal execution lineup.'
,
)
parser
.
add_argument
(
'--selenium'
,
dest
=
'selenium'
,
action
=
ActionSelenium
,
metavar
=
'BROWSERS'
,
'--selenium'
,
action
=
ActionSelenium
,
metavar
=
'BROWSERS'
,
help
=
'A comma-separated list of browsers to run the Selenium tests against.'
,
)
parser
.
add_argument
(
'--debug-sql'
,
action
=
'store_true'
,
dest
=
'debug_sql'
,
'--debug-sql'
,
action
=
'store_true'
,
help
=
'Turn on the SQL query logger within tests.'
,
)
parser
.
add_argument
(
'--parallel'
,
dest
=
'parallel'
,
nargs
=
'?'
,
default
=
0
,
type
=
int
,
'--parallel'
,
nargs
=
'?'
,
default
=
0
,
type
=
int
,
const
=
default_test_processes
(),
metavar
=
'N'
,
help
=
'Run tests using up to N parallel processes.'
,
)
...
...
tests/test_runner/runner.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -12,9 +12,9 @@ class CustomOptionsTestRunner(DiscoverRunner):
@classmethod
def
add_arguments
(
cls
,
parser
):
parser
.
add_argument
(
'--option_a'
,
'-a'
,
action
=
'store'
,
dest
=
'option_a'
,
default
=
'1'
),
parser
.
add_argument
(
'--option_b'
,
'-b'
,
action
=
'store'
,
dest
=
'option_b'
,
default
=
'2'
),
parser
.
add_argument
(
'--option_c'
,
'-c'
,
action
=
'store'
,
dest
=
'option_c'
,
default
=
'3'
),
parser
.
add_argument
(
'--option_a'
,
'-a'
,
default
=
'1'
),
parser
.
add_argument
(
'--option_b'
,
'-b'
,
default
=
'2'
),
parser
.
add_argument
(
'--option_c'
,
'-c'
,
default
=
'3'
),
def
run_tests
(
self
,
test_labels
,
extra_tests
=
None
,
**
kwargs
):
print
(
"
%
s:
%
s:
%
s"
%
(
self
.
option_a
,
self
.
option_b
,
self
.
option_c
))
tests/user_commands/management/commands/hal.py
Dosyayı görüntüle @
eac9ab7e
...
...
@@ -6,7 +6,7 @@ class Command(BaseCommand):
def
add_arguments
(
self
,
parser
):
parser
.
add_argument
(
'args'
,
metavar
=
'app_label'
,
nargs
=
'*'
,
help
=
'Specify the app label(s) to works on.'
)
parser
.
add_argument
(
'--empty'
,
action
=
'store_true'
,
dest
=
'empty'
,
help
=
"Do nothing."
)
parser
.
add_argument
(
'--empty'
,
action
=
'store_true'
,
help
=
"Do nothing."
)
def
handle
(
self
,
*
app_labels
,
**
options
):
app_labels
=
set
(
app_labels
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment