comparison roundup/cgi/client.py @ 1801:9f9d35f3d8f7

Change the message asking for confirmation of registration... ...to incorporate the option to just reply to the email.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Mon, 08 Sep 2003 21:07:29 +0000
parents 071ea6fc803f
children fe9d122f1bb1
comparison
equal deleted inserted replaced
1800:a3b1b1dcf639 1801:9f9d35f3d8f7
1 # $Id: client.py,v 1.136 2003-09-08 09:28:28 jlgijsbers Exp $ 1 # $Id: client.py,v 1.137 2003-09-08 21:07:29 jlgijsbers Exp $
2 2
3 __doc__ = """ 3 __doc__ = """
4 WWW request handler (also used in the stand-alone server). 4 WWW request handler (also used in the stand-alone server).
5 """ 5 """
6 6
764 props['__time'] = time.time() 764 props['__time'] = time.time()
765 self.db.otks.set(otk, **props) 765 self.db.otks.set(otk, **props)
766 766
767 # send the email 767 # send the email
768 tracker_name = self.db.config.TRACKER_NAME 768 tracker_name = self.db.config.TRACKER_NAME
769 subject = 'Complete your registration to %s'%tracker_name 769 tracker_email = self.db.config.TRACKER_EMAIL
770 body = ''' 770 subject = 'Complete your registration to %s -- key %s' % (tracker_name,
771 To complete your registration of the user "%(name)s" with %(tracker)s, 771 otk)
772 please visit the following URL: 772 body = """To complete your registration of the user "%(name)s" with
773 %(tracker)s, please do one of the following:
774
775 - send a reply to %(tracker_email)s and maintain the subject line as is (the
776 reply's additional "Re:" is ok),
777
778 - or visit the following URL:
773 779
774 %(url)s?@action=confrego&otk=%(otk)s 780 %(url)s?@action=confrego&otk=%(otk)s
775 '''%{'name': props['username'], 'tracker': tracker_name, 'url': self.base, 781 """ % {'name': props['username'], 'tracker': tracker_name, 'url': self.base,
776 'otk': otk} 782 'otk': otk, 'tracker_email': tracker_email}
777 if not self.standard_message(props['address'], subject, body): 783 if not self.standard_message(props['address'], subject, body,
784 tracker_email):
778 return 785 return
779 786
780 # commit changes to the database 787 # commit changes to the database
781 self.db.commit() 788 self.db.commit()
782 789
783 # redirect to the "you're almost there" page 790 # redirect to the "you're almost there" page
784 raise Redirect, '%suser?@template=rego_progress'%self.base 791 raise Redirect, '%suser?@template=rego_progress'%self.base
785 792
786 def standard_message(self, to, subject, body): 793 def standard_message(self, to, subject, body, author=None):
787 try: 794 try:
788 self.mailer.standard_message(to, subject, body) 795 self.mailer.standard_message(to, subject, body, author)
789 return 1 796 return 1
790 except MessageSendException, e: 797 except MessageSendException, e:
791 self.error_message.append(str(e)) 798 self.error_message.append(str(e))
792 799
793
794 def registerPermission(self, props): 800 def registerPermission(self, props):
795 ''' Determine whether the user has permission to register 801 ''' Determine whether the user has permission to register
796 802
797 Base behaviour is to check the user has "Web Registration". 803 Base behaviour is to check the user has "Web Registration".
798 ''' 804 '''

Roundup Issue Tracker: http://roundup-tracker.org/