Some style fixes in soc.logic.helper.notifications module. Little changes in welcome.html template.
Patch by: Pawel Solyga
--- a/app/soc/logic/helper/notifications.py Thu Dec 04 10:09:38 2008 +0000
+++ b/app/soc/logic/helper/notifications.py Fri Dec 05 12:24:02 2008 +0000
@@ -28,16 +28,16 @@
from django.utils.translation import ugettext_lazy
-import soc.logic.models as model_logic
-
from soc.logic import mail_dispatcher
from soc.views.helper import redirects
+import soc.logic.models as model_logic
-DEF_INVITATION_FMT = ugettext_lazy(
+
+DEF_INVITATION_MSG_FMT = ugettext_lazy(
"Invitation to become a %(role)s for %(group)s")
-DEF_WELCOME_FMT = ugettext_lazy("Welcome to Melange %(name)s")
+DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s")
def sendInviteNotification(entity):
"""Sends out an invite notification to the user the request is for.
@@ -73,7 +73,7 @@
'invitation_url': invitation_url,
'to': request_user_entity.account.email(),
'sender': current_user_entity.account.email(),
- 'subject': DEF_INVITATION_FMT % {
+ 'subject': DEF_INVITATION_MSG_FMT % {
'role': entity.role,
'group': group_entity.name
},
@@ -97,17 +97,18 @@
properties = {'account': users.get_current_user()}
current_user_entity = user_logic.logic.getForFields(properties, unique=True)
- # create the message contents
- # TODO(Lennard) change the message sender to some sort of no-reply adress that is
+ # TODO(Lennard): change the message sender to some sort of no-reply adress that is
# probably a setting in sitesettings. (adress must be a developer). This is due
# to a GAE limitation that allows only devs or the current user to send an email.
# Currently this results in a user receiving the same email twice.
+
+ # create the message contents
messageProperties = {
'to_name': user_entity.name,
'sender_name': current_user_entity.name,
'to': user_entity.account.email(),
'sender': current_user_entity.account.email(),
- 'subject': DEF_WELCOME_FMT % {
+ 'subject': DEF_WELCOME_MSG_FMT % {
'name': user_entity.name
}
}
--- a/app/soc/templates/soc/mail/welcome.html Thu Dec 04 10:09:38 2008 +0000
+++ b/app/soc/templates/soc/mail/welcome.html Fri Dec 05 12:24:02 2008 +0000
@@ -15,8 +15,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
{% block content %}
Welcome to Melange. If you are reading this it means you have successfully registered as user
-on our website. Currently Melange is still being developed, if you run into any trouble you can usually
-find us on #melange on Freenode. If you find any bugs you
-can report them <a href="http://code.google.com/p/soc/issues/list">here</a>.
+on our website. Currently Melange is still under development, if you run into any trouble you can usually
+find us at #melange on freenode IRC network. If you find any bugs, please report them to our <a href="http://code.google.com/p/soc/issues/list">Issue Tracker</a>.
{% endblock %}
{% block signature %}Greetings, <br />The Melange Team{% endblock %}