Add a global setting for the canonical url.

This is used in the emails, because when people come from
different urls, they get different urls in the emails;
it was pulling the base url from the http request's notion
of things.
This commit is contained in:
Joe Onorato
2008-10-21 21:51:51 -07:00
parent 054f8b70bf
commit 1c94000bbc
7 changed files with 59 additions and 2 deletions

View File

@@ -20,8 +20,9 @@ from google.appengine.api import users
import django.template
import models
import email
import library
import models
def get_default_sender():
return models.Settings.get_settings().from_email
@@ -83,7 +84,7 @@ def send_change_message(request, change, template, template_args):
to_users = set([change.owner] + change.reviewers + change.cc)
subject = make_change_subject(change)
args = {
'url': request.build_absolute_uri('/%s' % change.key().id()),
'url': library.change_url(change)
}
if template_args:
args.update(template_args)