Skip to content

Commit

Permalink
Merge branch 'dev' into prepa-django4-ifnotequal
Browse files Browse the repository at this point in the history
  • Loading branch information
Situphen authored Oct 1, 2023
2 parents 195f807 + fb54169 commit f0259b4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 11 deletions.
19 changes: 14 additions & 5 deletions zds/forum/signals.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
from django.dispatch import Signal

topic_moved = Signal(providing_args=["topic"])
topic_edited = Signal(providing_args=["topic"])
topic_read = Signal(providing_args=["instance", "user"])
post_read = Signal(providing_args=["instance", "user"])
post_unread = Signal(providing_args=["post", "user"])
# argument: topic
topic_moved = Signal()

# argument: topic
topic_edited = Signal()

# arguments: instance, user
topic_read = Signal()

# arguments: instance, user
post_read = Signal()

# arguments: post, user
post_unread = Signal()
3 changes: 2 additions & 1 deletion zds/notification/signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from django.dispatch import Signal

# is sent when a content is read (topic, article or tutorial)
content_read = Signal(providing_args=["instance", "user", "target"])
# arguments: instance, user, target
content_read = Signal()
9 changes: 6 additions & 3 deletions zds/tutorialv2/signals.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from django.dispatch.dispatcher import Signal

# Display management
content_read = Signal(providing_args=["instance", "user", "target"])
# arguments: instance, user, target
content_read = Signal()

# Publication events
content_published = Signal(providing_args=["instance", "user", "by_email"])
content_unpublished = Signal(providing_args=["instance", "target", "moderator"])
# arguments: instance, user, by_email
content_published = Signal()
# arguments: instance, target, moderator
content_unpublished = Signal()

# Authors management
# For the signal below, the arguments "performer", "content", "author" and "action" shall be provided.
Expand Down
7 changes: 5 additions & 2 deletions zds/utils/signals.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from django.dispatch import Signal

ping = Signal(providing_args=["instance", "user", "by_email"])
unping = Signal(providing_args=["instance", "user"])
# arguments: instance, user, by_email
ping = Signal()

# arguments: instance, user
unping = Signal()

0 comments on commit f0259b4

Please sign in to comment.