X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=influences%2Fnotify.py;fp=influences%2Fnotify.py;h=3cbb94eddc8d0257f350e1605b49473cbdf9e688;hb=b69c90a1bdebcef58c9ee83eec490637af3a577f;hp=0000000000000000000000000000000000000000;hpb=9babde1e22ffce2534f5c62b7e06afeb62261469;p=matthijs%2Fprojects%2Fxerxes.git diff --git a/influences/notify.py b/influences/notify.py new file mode 100644 index 0000000..3cbb94e --- /dev/null +++ b/influences/notify.py @@ -0,0 +1,10 @@ +from django.db.models import signals +from django.dispatch import dispatcher +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, 'influences/email/character_changed', {'character' : instance, 'created' : created}) + +dispatcher.connect(character_saved, signals.post_save, Character)