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
d1f93e9c
Kaydet (Commit)
d1f93e9c
authored
Nis 25, 2014
tarafından
Claude Paroz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22507 -- Clarified nature of the sender argument of signals
üst
3033a719
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
signals.txt
docs/topics/signals.txt
+5
-4
No files found.
docs/topics/signals.txt
Dosyayı görüntüle @
d1f93e9c
...
...
@@ -235,7 +235,8 @@ For example:
This declares a ``pizza_done`` signal that will provide receivers with
``toppings`` and ``size`` arguments.
Remember that you're allowed to change this list of arguments at any time, so getting the API right on the first try isn't necessary.
Remember that you're allowed to change this list of arguments at any time, so
getting the API right on the first try isn't necessary.
Sending signals
---------------
...
...
@@ -246,8 +247,8 @@ There are two ways to send signals in Django.
.. method:: Signal.send_robust(sender, **kwargs)
To send a signal, call either :meth:`Signal.send` or :meth:`Signal.send_robust`.
You must provide the ``sender`` argument
, and may provide as many other keyword
arguments as you like.
You must provide the ``sender`` argument
(which is a class most of the time),
a
nd may provide as many other keyword a
rguments as you like.
For example, here's how sending our ``pizza_done`` signal might look:
...
...
@@ -257,7 +258,7 @@ For example, here's how sending our ``pizza_done`` signal might look:
...
def send_pizza(self, toppings, size):
pizza_done.send(sender=self, toppings=toppings, size=size)
pizza_done.send(sender=self
.__class__
, toppings=toppings, size=size)
...
Both ``send()`` and ``send_robust()`` return a list of tuple pairs
...
...
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