Revision 1cbce16f snf-astakos-app/astakos/im/forms.py

b/snf-astakos-app/astakos/im/forms.py
45 45
from django.utils.safestring import mark_safe
46 46
from django.utils.encoding import smart_str
47 47
from django.forms.extras.widgets import SelectDateWidget
48
from django.conf import settings
48 49

  
49 50
from astakos.im.models import (AstakosUser, EmailChange, AstakosGroup, Invitation,
50 51
    Membership, GroupKind, get_latest_terms
51 52
)
52
from astakos.im.settings import (INVITATIONS_PER_LEVEL, DEFAULT_FROM_EMAIL,
53
    BASEURL, SITENAME, RECAPTCHA_PRIVATE_KEY, DEFAULT_CONTACT_EMAIL,
54
    RECAPTCHA_ENABLED, LOGGING_LEVEL
53
from astakos.im.settings import (INVITATIONS_PER_LEVEL, BASEURL, SITENAME,
54
    RECAPTCHA_PRIVATE_KEY, RECAPTCHA_ENABLED, DEFAULT_CONTACT_EMAIL,
55
    LOGGING_LEVEL
55 56
)
56 57
from astakos.im.widgets import DummyWidget, RecaptchaWidget
57 58
from astakos.im.functions import send_change_email
......
401 402
        """
402 403
        for user in self.users_cache:
403 404
            url = reverse('django.contrib.auth.views.password_reset_confirm',
404
                          kwargs={'uidb36':int_to_base36(user.id),
405
                                  'token':token_generator.make_token(user)})
405
                kwargs={'uidb36':int_to_base36(user.id),
406
                    'token':token_generator.make_token(user)
407
                }
408
            )
406 409
            url = urljoin(BASEURL, url)
407 410
            t = loader.get_template(email_template_name)
408 411
            c = {
......
413 416
                'baseurl': BASEURL,
414 417
                'support': DEFAULT_CONTACT_EMAIL
415 418
            }
416
            from_email = DEFAULT_FROM_EMAIL
419
            from_email = settings.SERVER_EMAIL
417 420
            send_mail(_("Password reset on %s alpha2 testing") % SITENAME,
418 421
                t.render(Context(c)), from_email, [user.email])
419 422

  

Also available in: Unified diff