From: Matthijs Kooijman Date: Mon, 15 Jun 2009 10:01:42 +0000 (+0200) Subject: Merge branch 'production' X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fprojects%2Fxerxes.git;a=commitdiff_plain;h=884bf66b55546555bfd3df318b9318e8358b02cf Merge branch 'production' * production: Remove SQL password from import.py. Add code to support disabling new influences. Remove \r's. Only notify a player of finished influence changes. --- 884bf66b55546555bfd3df318b9318e8358b02cf diff --cc influences/notify.py index d53ab36,daffadf..6aae6f2 --- a/influences/notify.py +++ b/influences/notify.py @@@ -17,10 -17,10 +17,12 @@@ signals.post_save.connect(character_sav def influence_saved(**kwargs): instance = kwargs['instance'] created = kwargs['created'] + recipients = ['lextalionis@evolution-events.nl'] + recipients.extend(instance.related_players.keys()) if (not settings.DEBUG): - # TODO: Perhaps only notify when the status is / becomes Done? + recipients = ['lextalionis@evolution-events.nl'] + if instance.status == 'D': + recipients.append(instance.character.player) notify(recipients, 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created}) signals.post_save.connect(influence_saved, sender=Influence) diff --cc templates/influences/influence_detail.html index 5c50b67,8bddb9c..12ec468 --- a/templates/influences/influence_detail.html +++ b/templates/influences/influence_detail.html @@@ -16,17 -11,10 +16,21 @@@ {% endif %}

{{ object.description }}

+{# Show all related players, except for the current user #} +{% with object.related_players|remove_item:user as players %} + {% if players %} + {% trans "Note: This influence (and its comments) can also be viewed by:" %} + + {% endif %} +{% endwith %} + {% if object.result %} +

{% trans "Result" %}

+

{{ object.result }}

+ {% endif %}

{% trans "Comments" %}

{% block comments %} {% include "influences/influence_comments_block.html" %}