diff --git a/mail/20171023104036_7z0s.eml b/mail/20171023104036_7z0s.eml new file mode 100644 index 0000000..85cd7a4 --- /dev/null +++ b/mail/20171023104036_7z0s.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + +
+=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/68297eb302224e77b3dfe7264c328ed2 +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104054_c95d.eml b/mail/20171023104054_c95d.eml new file mode 100644 index 0000000..57d9de6 --- /dev/null +++ b/mail/20171023104054_c95d.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/7f9ec1dedca1402cbf9d38ee3709efdd +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104107_zi5j.eml b/mail/20171023104107_zi5j.eml new file mode 100644 index 0000000..52d1f26 --- /dev/null +++ b/mail/20171023104107_zi5j.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/a7967f6249a545afbd5903ff1eb07381 +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104203_jphu.eml b/mail/20171023104203_jphu.eml new file mode 100644 index 0000000..f4f527d --- /dev/null +++ b/mail/20171023104203_jphu.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/b2c98fbf355147ac96ffa6eac9ca9079 +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104247_zj8w.eml b/mail/20171023104247_zj8w.eml new file mode 100644 index 0000000..869d729 --- /dev/null +++ b/mail/20171023104247_zj8w.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/c730af7ecfde42899c1d6c5f5e488d62 +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104351_istb.eml b/mail/20171023104351_istb.eml new file mode 100644 index 0000000..d411867 --- /dev/null +++ b/mail/20171023104351_istb.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/010d7d85a9fa415ca88d0a0bfce3fe8e +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/mail/20171023104501_9pm0.eml b/mail/20171023104501_9pm0.eml new file mode 100644 index 0000000..c13d4d1 --- /dev/null +++ b/mail/20171023104501_9pm0.eml @@ -0,0 +1,39 @@ +Content-Type: text/html; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable +From: ordr@example.com +Subject: [ordr] Please verify your email address +To: amy@example.com +Content-Disposition: inline + + + + +=09 +=20=20=09+=20=20=09=09Please=20verify=20your=20email=20address=20for=20the=20account= +=20""=20by=20following=20this=20link +=20=20=09=09http://localhost/account/b1e2b70fad024881ab5f5d421eea371a +=09
+=09
+=09=09Regards,
+=09=09
+=09=09ordr
+=09
+=09=09Please=20don't=20respont=20to=20this=20email!=20This=20is=20an= +=20automatically=20generated=20notification=20by=20the=20system. +=09=09 +=09
+ + \ No newline at end of file diff --git a/ordr2/events.py b/ordr2/events.py index 3fb29c1..df0a97b 100644 --- a/ordr2/events.py +++ b/ordr2/events.py @@ -37,25 +37,25 @@ class UserNotification(object): class CompleteRegistration(UserNotification): ''' user notification for account activation ''' - subject='[ordr] Please verify your email address' + subject = '[ordr] Please verify your email address' template = 'ordr2:templates/emails/registration.jinja2' class AccountActivation(UserNotification): ''' user notification for account activation ''' - subject='[ordr] Your account was activated' + subject = '[ordr] Your account was activated' template = 'ordr2:templates/emails/activation.jinja2' class PasswordReset(UserNotification): ''' user notification for password reset link ''' - subject='[ordr] Password Reset' + subject = '[ordr] Password Reset' template = 'ordr2:templates/emails/password_reset.jinja2' class OrderStatusChange(UserNotification): ''' user notification for order status change ''' - subject='[ordr] Order Status Change' + subject = '[ordr] Order Status Change' template = 'ordr2:templates/emails/order.jinja2' diff --git a/ordr2/schemas/__init__.py b/ordr2/schemas/__init__.py index 01ad178..9ab51cd 100644 --- a/ordr2/schemas/__init__.py +++ b/ordr2/schemas/__init__.py @@ -10,6 +10,7 @@ from .helpers import ( deferred_csrf_validator ) + # Base Schema class CSRFSchema(colander.Schema): diff --git a/ordr2/schemas/account.py b/ordr2/schemas/account.py index 48db69d..51f5987 100644 --- a/ordr2/schemas/account.py +++ b/ordr2/schemas/account.py @@ -22,7 +22,7 @@ class RegistrationSchema(CSRFSchema): readonly=True ), description='automagically generated for you', - validator = deferred_unique_username_validator, + validator=deferred_unique_username_validator, ) first_name = colander.SchemaNode( colander.String() @@ -47,4 +47,3 @@ class RegistrationSchema(CSRFSchema): } settings.update(override) return super().as_form(request, **settings) - diff --git a/ordr2/schemas/helpers.py b/ordr2/schemas/helpers.py index e22a43f..fa50a5f 100644 --- a/ordr2/schemas/helpers.py +++ b/ordr2/schemas/helpers.py @@ -1,7 +1,6 @@ ''' helper functions for schemas ''' import colander -import deform from pyramid.csrf import get_csrf_token, check_csrf_token diff --git a/ordr2/templates/account/registration_completed.jinja2 b/ordr2/templates/account/registration_completed.jinja2 new file mode 100644 index 0000000..4115e42 --- /dev/null +++ b/ordr2/templates/account/registration_completed.jinja2 @@ -0,0 +1,17 @@ +{% extends "ordr2:templates/layout.jinja2" %} + +{% block title %} Ordr | Account Registration {% endblock title %} + +{% block content %} +Thank you for verifying your email address.
+Before you can start ordering, an administrator must activate your account
+You'll receive an email when your account is activated
+ +To complete the registration process an email has been sent to you.
+Please follow the link in the email to verify your address and complete the registration process
+ +