aboutsummaryrefslogtreecommitdiff
path: root/app/dispatchAuth
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2017-11-10 21:08:11 -0500
committerMitch Riedstra <mitch@riedstra.us>2017-11-10 21:08:11 -0500
commit4d1ce945792648fca00d50ce18a61b775589d9ae (patch)
tree3686b541946af10aae92ef104aa5cbd31483687f /app/dispatchAuth
parent6155857dcd9a88d07756c465df42c5155c7183dc (diff)
downloaddispatch-tracker-4d1ce945792648fca00d50ce18a61b775589d9ae.tar.gz
dispatch-tracker-4d1ce945792648fca00d50ce18a61b775589d9ae.tar.xz
Working invites in the Driver's list page
Diffstat (limited to 'app/dispatchAuth')
-rw-r--r--app/dispatchAuth/models.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/dispatchAuth/models.py b/app/dispatchAuth/models.py
index 8173146..a1c4b55 100644
--- a/app/dispatchAuth/models.py
+++ b/app/dispatchAuth/models.py
@@ -1,5 +1,5 @@
from django.contrib.auth.models import AbstractUser, AbstractBaseUser, PermissionsMixin, BaseUserManager
-from app.settings import WEBSITE_URI
+from app.settings import WEBSITE_URI, WEB_APP_NAME
from django.template.loader import render_to_string
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
@@ -77,7 +77,8 @@ class User(PermissionsMixin, AbstractBaseUser):
"""Send an invite for a new user to register"""
current_site = WEBSITE_URI
message = render_to_string('dispatch/invite_email.txt',
- { 'name': name, 'user': self, 'site': current_site })
+ { 'name': name, 'user': self, 'site': current_site,
+ 'app_name': WEB_APP_NAME })
send_mail("Invitation to register at {}".format(current_site),
message,