From ecbe0f380cce9f3f497c3652bc06151cb3ea7c79 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Wed, 23 Feb 2011 15:45:40 +0100 Subject: more mail parameters --- coip/apps/invitation/models.py | 9 +++++---- coip/settings.py | 3 +++ templates/apps/userprofile/home.html | 6 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/coip/apps/invitation/models.py b/coip/apps/invitation/models.py index 2c1b33b..dd8bc72 100644 --- a/coip/apps/invitation/models.py +++ b/coip/apps/invitation/models.py @@ -11,6 +11,7 @@ from pprint import pformat from django.core.mail import send_mail from coip.apps.userprofile.models import last_used_profile import logging +from coip.settings import PREFIX_URL, NOREPLY class Invitation(models.Model): ''' @@ -39,13 +40,13 @@ class Invitation(models.Model): --- If you want to accept the invitation open this link in your browser: -http://localhost/invitation/%s/accept +%s/invitation/%s/accept To view information about \'%s\' open this link in your browser: -http://localhost/name/%s +%s/name/id/%s -''' % (pinviter.display_name,pinviter.identifier,self.name.short,self.message,self.nonce,self.name.short,self.name.id), - 'noreply@coip.example.com', +''' % (pinviter.display_name,pinviter.identifier,self.name.short,self.message,PREFIX_URL,self.nonce,self.name.short,PREFIX_URL,self.name.id), + NOREPLY, [self.email], fail_silently=False) return diff --git a/coip/settings.py b/coip/settings.py index 6a62af4..e7f7374 100644 --- a/coip/settings.py +++ b/coip/settings.py @@ -31,6 +31,9 @@ LANGUAGE_CODE = 'us-en' SITE_ID = 1 +PREFIX_URL = 'http://localhost:8000' +NOREPLY = 'noreply@localhost' + # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = True diff --git a/templates/apps/userprofile/home.html b/templates/apps/userprofile/home.html index 6c78d46..00feb0b 100644 --- a/templates/apps/userprofile/home.html +++ b/templates/apps/userprofile/home.html @@ -24,10 +24,10 @@ {% empty %} -

You are not a member of any groups yet...

+

You are not a member of any groups yet...

{% endfor %} -

Names

+

Groups

{% for n,p in names %}
@@ -37,7 +37,7 @@
{% empty %} -

You do not control any names

+

You do not have control over any groups yet...

{% endfor %} {% endblock %} \ No newline at end of file -- cgit v1.1