projects
/
matthijs
/
projects
/
xerxes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
876093e
)
Update signal handling to work with the changes introduced in django r8223.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 18 Aug 2008 18:48:18 +0000
(20:48 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Mon, 18 Aug 2008 18:48:18 +0000
(20:48 +0200)
influences/notify.py
patch
|
blob
|
history
diff --git
a/influences/notify.py
b/influences/notify.py
index 34de0b9f0ac04868169b9cbf15844b7e9a3c5cbf..86a5047c63a4215dd00317c1f74af708fd140eb2 100644
(file)
--- a/
influences/notify.py
+++ b/
influences/notify.py
@@
-5,16
+5,21
@@
from xerxes.influences.models import Character,Influence
from xerxes.tools.notify import notify
from django.contrib.auth.models import Group
from xerxes.tools.notify import notify
from django.contrib.auth.models import Group
-def character_saved(instance, created):
+def character_saved(**kwargs):
+ instance = kwargs['instance']
+ created = kwargs['created']
if (not settings.DEBUG):
notify([instance.player, 'lextalionis@evolution-events.nl'], 'influences/email/character_changed.html', {'character' : instance, 'created' : created})
if (not settings.DEBUG):
notify([instance.player, 'lextalionis@evolution-events.nl'], 'influences/email/character_changed.html', {'character' : instance, 'created' : created})
-
dispatcher.connect(character_saved, signals.post_save,
Character)
+
signals.post_save.connect(character_saved, sender=
Character)
-def influence_saved(instance, created):
+def influence_saved(**kwargs):
+ instance = kwargs['instance']
+ created = kwargs['created']
if (not settings.DEBUG):
# TODO: Perhaps only notify when the status is / becomes Done?
notify([instance.character.player, 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
if (not settings.DEBUG):
# TODO: Perhaps only notify when the status is / becomes Done?
notify([instance.character.player, 'lextalionis@evolution-events.nl'], 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created})
-dispatcher.connect(influence_saved, signals.post_save, Influence)
+signals.post_save.connect(influence_saved, sender=Influence)
+
# vim: set sts=4 sw=4 expandtab:
# vim: set sts=4 sw=4 expandtab: