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:
6e1daff
)
* Only set notification emails when DEBUG is disabled.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 10 Feb 2008 14:48:24 +0000
(15:48 +0100)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Sun, 10 Feb 2008 14:48:24 +0000
(15:48 +0100)
influences/notify.py
patch
|
blob
|
history
diff --git
a/influences/notify.py
b/influences/notify.py
index 7b47e8cdab927b6b0761ddacd9ea1ee1bab156cb..6ce979c582f183af1a9142fd05624b8f4a022829 100644
(file)
--- a/
influences/notify.py
+++ b/
influences/notify.py
@@
-1,17
+1,20
@@
from django.db.models import signals
from django.dispatch import dispatcher
from django.db.models import signals
from django.dispatch import dispatcher
+from django.conf import settings
from ee.influences.models import Character,Influence
from ee.tools.notify import notify
from django.contrib.auth.models import Group
def character_saved(instance, created):
from ee.influences.models import Character,Influence
from ee.tools.notify import notify
from django.contrib.auth.models import Group
def character_saved(instance, created):
- 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)
def influence_saved(instance, created):
dispatcher.connect(character_saved, signals.post_save, Character)
def influence_saved(instance, created):
- # 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)
# vim: set sts=4 sw=4 expandtab:
dispatcher.connect(influence_saved, signals.post_save, Influence)
# vim: set sts=4 sw=4 expandtab: