Changeset 5428


Ignore:
Timestamp:
12 Aug 2010, 16:57:26 (14 years ago)
Author:
Henrik Bettermann
Message:

Merge with trunk.

Location:
main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/accesscodes/browser.txt

    r5132 r5428  
    5454
    5555    >>> browser.open('http://localhost/myuniversity')
    56     >>> browser.getLink('Manage access-codes').click()
     56    >>> browser.getLink('Access Codes').click()
    5757    >>> print browser.contents
    5858    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/app.py

    r5407 r5428  
    8383            plugin.setup(self, name, self.logger)
    8484        return
    85        
     85
     86    def updatePlugins(self):
     87        """Lookup all plugins and call their `update()` method.
     88        """
     89        for name, plugin in getUtilitiesFor(IWAeUPSIRPPluggable):
     90            plugin.update(self, name, self.logger)
     91        return
     92
    8693    def _setupLogger(self, logger):
    8794        """Setup general application logger.
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/browser/pages.py

    r5426 r5428  
    142142        return
    143143
     144    @grok.action('Update plugins', validator=NullValidator)
     145    def updatePlugins(self, **data):
     146        self.context.updatePlugins()
     147        self.flash('Plugins were updated. See log file for details.')
     148        self.redirect(self.url(self.context))
     149        return
     150
    144151class AdministrationPage(WAeUPPage):
    145152    """ The administration overview page.
     
    340347        msg = MIMEText(text % (fullname,regno,descr))
    341348        msg['From'] = '%s <%s>' % (fullname,email)
    342         msg['To'] = 'henrik@waeup.org'
     349       
     350        # These parameters should be part of the portal configuration.
     351        msg['To'] = 'contact@waeup.org'
    343352        msg['Subject'] = 'WAeUP Contact'
    344         server = smtplib.SMTP('smtp.scientific-african.org')
    345         server.login('henrik@scientific-african.org','kwamekofi')
    346         server.sendmail(email,'henrik@waeup.org',msg.as_string())
     353        #server = smtplib.SMTP('smtp_server')
     354        #server.login('user_name','secret_password')
     355        server = smtplib.SMTP('localhost')
     356        server.sendmail(email,'contact@waeup.org',msg.as_string())
     357       
    347358        server.quit()
    348359        self.flash('Your message has been sent.')
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/jambtables/applicants.py

    r5328 r5428  
    122122    grok.implements(IApplicantContainer)
    123123
    124 class AccessCodePlugin(grok.GlobalUtility):
     124class ApplicantsPlugin(grok.GlobalUtility):
     125    """A WAeUPSIRPPlugin that creates an applications folder in portal.
     126    """
    125127    grok.name('applications')
    126128    grok.implements(IWAeUPSIRPPluggable)
     
    141143                    site, ))
    142144        return
    143 
  • main/waeup.sirp/branches/henrik-contactforms/src/waeup/sirp/permissions.txt

    r5140 r5428  
    1111    >>> from waeup.sirp.permissions import getRoles
    1212    >>> getRoles()
    13     ['waeup.PortalManager', 'waeup.PortalUser']
     13    ['waeup.Applicant', 'waeup.PortalManager', 'waeup.PortalUser']
    1414
Note: See TracChangeset for help on using the changeset viewer.