summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:49:16 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-04-21 02:49:16 -0400
commita22557811a24b68ef85d4271787c48d8d1e4fc99 (patch)
treea93ddda92409a6229b5bf38eadff6f9685602d7f /devel
parent8ff271216f421594970631eec1ba156a8a35e561 (diff)
catch a few more instances of archlinux
Diffstat (limited to 'devel')
-rw-r--r--devel/forms.py3
-rw-r--r--devel/utils.py4
2 files changed, 4 insertions, 3 deletions
diff --git a/devel/forms.py b/devel/forms.py
index 861a576c..7f7c281e 100644
--- a/devel/forms.py
+++ b/devel/forms.py
@@ -2,6 +2,7 @@ import random
from string import ascii_letters, digits
from django import forms
+from django.conf import settings
from django.contrib.auth.models import User, Group
from django.contrib.sites.models import Site
from django.core.mail import send_mail
@@ -92,7 +93,7 @@ class NewUserForm(forms.ModelForm):
send_mail("Your new archweb account",
template.render(ctx),
- 'Arch Website Notification <nobody@archlinux.org>',
+ settings.BRANDING_EMAIL,
[user.email],
fail_silently=False)
diff --git a/devel/utils.py b/devel/utils.py
index 340841f5..7dd64972 100644
--- a/devel/utils.py
+++ b/devel/utils.py
@@ -1,5 +1,6 @@
import re
+from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from django.db import connection
@@ -74,9 +75,8 @@ class UserFinder(object):
if email and '@' in email:
# split email addr at '@' symbol, ensure domain matches
# or is a subdomain of archlinux.org
- # TODO: configurable domain/regex somewhere?
username, domain = email.split('@', 1)
- if re.match(r'^(.+\.)?archlinux.org$', domain):
+ if re.match(settings.DOMAIN_RE, domain):
return User.objects.get(username=username)
return None