diff gpp/accounts/forms.py @ 2:f3ad863505bf

Got rid of the core.SiteConfig model and all usage.
author Brian Neal <bgneal@gmail.com>
date Sat, 11 Apr 2009 17:57:22 +0000
parents dbd703f7d63a
children b6263ac72052
line wrap: on
line diff
--- a/gpp/accounts/forms.py	Mon Apr 06 02:43:12 2009 +0000
+++ b/gpp/accounts/forms.py	Sat Apr 11 17:57:22 2009 +0000
@@ -6,7 +6,7 @@
 from django.template.loader import render_to_string
 from django.contrib.sites.models import Site
 
-from core.models import SiteConfig
+import settings
 from core.functions import send_mail
 from accounts.models import PendingUser
 from accounts.models import IllegalUsername
@@ -72,7 +72,7 @@
       # Send the confirmation email
 
       site = Site.objects.get_current()
-      site_config = SiteConfig.objects.get_current()
+      admin_email = settings.ADMINS[0][1]
 
       activation_link = 'http://%s%s' % (site.domain, reverse('accounts.views.register_confirm', 
             kwargs = {'username' : pending_user.username, 'key' : pending_user.key}))
@@ -85,11 +85,11 @@
                'activation_link' : activation_link,
                'username' : pending_user.username,
                'raw_password' : self.cleaned_data['password1'],
-               'admin_email' : site_config.admin_email,
+               'admin_email' : admin_email,
             })
 
       subject = 'Registration Confirmation for ' + site.name
-      send_mail(subject, msg, site_config.admin_email, [self.cleaned_data['email']])
+      send_mail(subject, msg, admin_email, [self.cleaned_data['email']])
 
       return pending_user