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
b4002a21
Kaydet (Commit)
b4002a21
authored
Eyl 02, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #22835 -- Removed NoArgsCommand per deprecation timeline.
üst
6eed9ae7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
54 deletions
+4
-54
base.py
django/core/management/base.py
+0
-34
custom-management-commands.txt
docs/howto/custom-management-commands.txt
+0
-16
deprecation.txt
docs/internals/deprecation.txt
+1
-1
1.8.txt
docs/releases/1.8.txt
+3
-3
No files found.
django/core/management/base.py
Dosyayı görüntüle @
b4002a21
...
...
@@ -7,14 +7,12 @@ from __future__ import unicode_literals
import
os
import
sys
import
warnings
from
argparse
import
ArgumentParser
import
django
from
django.core
import
checks
from
django.core.management.color
import
color_style
,
no_style
from
django.db
import
connections
from
django.utils.deprecation
import
RemovedInDjango110Warning
from
django.utils.encoding
import
force_str
...
...
@@ -500,35 +498,3 @@ class LabelCommand(BaseCommand):
string as given on the command line.
"""
raise
NotImplementedError
(
'subclasses of LabelCommand must provide a handle_label() method'
)
class
NoArgsCommand
(
BaseCommand
):
"""
A command which takes no arguments on the command line.
Rather than implementing ``handle()``, subclasses must implement
``handle_noargs()``; ``handle()`` itself is overridden to ensure
no arguments are passed to the command.
Attempting to pass arguments will raise ``CommandError``.
"""
args
=
''
def
__init__
(
self
):
warnings
.
warn
(
"NoArgsCommand class is deprecated and will be removed in Django 1.10. "
"Use BaseCommand instead, which takes no arguments by default."
,
RemovedInDjango110Warning
)
super
(
NoArgsCommand
,
self
)
.
__init__
()
def
handle
(
self
,
*
args
,
**
options
):
if
args
:
raise
CommandError
(
"Command doesn't accept any arguments"
)
return
self
.
handle_noargs
(
**
options
)
def
handle_noargs
(
self
,
**
options
):
"""
Perform this command's actions.
"""
raise
NotImplementedError
(
'subclasses of NoArgsCommand must provide a handle_noargs() method'
)
docs/howto/custom-management-commands.txt
Dosyayı görüntüle @
b4002a21
...
...
@@ -352,22 +352,6 @@ Rather than implementing :meth:`~BaseCommand.handle`, subclasses must implement
Perform the command's actions for ``label``, which will be the string as
given on the command line.
.. class:: NoArgsCommand
.. deprecated:: 1.8
Use :class:`BaseCommand` instead, which takes no arguments by default.
A command which takes no arguments on the command line.
Rather than implementing :meth:`~BaseCommand.handle`, subclasses must implement
:meth:`~NoArgsCommand.handle_noargs`; :meth:`~BaseCommand.handle` itself is
overridden to ensure no arguments are passed to the command.
.. method:: NoArgsCommand.handle_noargs(**options)
Perform this command's actions
.. _ref-command-exceptions:
Command exceptions
...
...
docs/internals/deprecation.txt
Dosyayı görüntüle @
b4002a21
...
...
@@ -130,7 +130,7 @@ details on these changes.
* Support for :py:mod:`optparse` will be dropped for custom management commands
(replaced by :py:mod:`argparse`).
* The class
:class:`~django.core.management.NoArgsCommand
` will be removed. Use
* The class
``django.core.management.NoArgsCommand`
` will be removed. Use
:class:`~django.core.management.BaseCommand` instead, which takes no arguments
by default.
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
b4002a21
...
...
@@ -1384,9 +1384,9 @@ arguments through ``argparse.add_argument()``. See
``django.core.management.NoArgsCommand``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The class
:class:`~django.core.management.NoArgsCommand` is now deprecated and
will be removed in Django 1.10. Use :class:`~django.core.management.BaseCommand`
instead, which takes no
arguments by default.
The class
``NoArgsCommand`` is now deprecated and will be removed in Django
1.10. Use :class:`~django.core.management.BaseCommand` instead, which takes no
arguments by default.
Listing all migrations in a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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