Commit f53a10aaffbb577352a97b225adbf195fb277e72
1 parent
057d2cc3f7
Exists in
master
add django-extensions
Showing 4 changed files with 7 additions and 10 deletions Side-by-side Diff
flashcards/models.py
View file @
f53a10a
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | import flashcards.notifications |
89 | 89 | |
90 | 90 | flashcards.notifications.notify_score_change(flashcard) |
91 | - flashcards.notifications.deck_card_score_change(flashcard) | |
91 | + flashcards.notifications.notify_pull(flashcard) | |
92 | 92 | |
93 | 93 | def unpull(self, flashcard): |
94 | 94 | if not self.is_in_section(flashcard.section): |
flashcards/notifications.py
View file @
f53a10a
... | ... | @@ -20,17 +20,10 @@ |
20 | 20 | message = RedisMessage(ws_message) |
21 | 21 | redis_publisher.publish_message(message) |
22 | 22 | |
23 | -# def tell all clients the score changed | |
24 | - # you added a card | |
25 | - # | |
26 | -def deck_card_score_change(flashcard): | |
23 | +def notify_pull(flashcard): | |
27 | 24 | redis_publisher = RedisPublisher(facility='deck/%d' % flashcard.section_id, users=[SELF]) |
28 | 25 | ws_message = JSONRenderer().render( |
29 | 26 | {'event_type': 'pull_card', 'flashcard': serializers.FlashcardSerializer(flashcard).data}) |
30 | 27 | message = RedisMessage(ws_message) |
31 | 28 | redis_publisher.publish_message(message) |
32 | - | |
33 | - | |
34 | - | |
35 | -# def hiding stuff |
flashy/settings.py
View file @
f53a10a