Ejemplo n.º 1
0
def enable_event(event):
    sendmail(u'[SAUCE] Event request granted', u'''
Your Request for the Event "%s" in SAUCE has been granted.
You can now access the event at %s.
''' % (event.name, url(event.url, qualified=True)),
        to_addrs=event.teacher.email_address, cc_managers=True)
    return True
Ejemplo n.º 2
0
def enable_event(event):
    sendmail(u'[SAUCE] Event request granted',
             u'''
Your Request for the Event "%s" in SAUCE has been granted.
You can now access the event at %s.
''' % (event.name, url(event.url, qualified=True)),
             to_addrs=event.teacher.email_address,
             cc_managers=True)
    return True
Ejemplo n.º 3
0
    def post(self, *args, **kw):
        # Inject
        kw['teacher'] = request.user
        # Force CrudController.post to return a dict
        request.response_type = 'application/json'
        result = super(EventRequestController, self).post(self, *args, **kw)
        value = result['value']
        sendmail(u'[SAUCE] Event requested', u'''
A new Event has been requested in SAUCE.
Review the request at %s.
''' % url('/events/request', qualified=True), cc_managers=True)
        flash('Event "%s" successfully requested. Now awaiting administrator approval.' % (value.name), 'ok')
        return redirect('/')
Ejemplo n.º 4
0
    def post(self, *args, **kw):
        # Inject
        kw['teacher'] = request.user
        # Force CrudController.post to return a dict
        request.response_type = 'application/json'
        result = super(EventRequestController, self).post(*args, **kw)
        value = result['value']
        sendmail(u'[SAUCE] Event requested',
                 u'''
A new Event has been requested in SAUCE.
Review the request at %s.
''' % url('/events/request', qualified=True),
                 cc_managers=True)
        flash(
            'Event "%s" successfully requested. Now awaiting administrator approval.'
            % (value.name), 'ok')
        return redirect('/')
Ejemplo n.º 5
0
 def sendmail(self, *args, **kwargs):
     return sendmail('Subject', 'Bödy', ['*****@*****.**', None], '*****@*****.**', cc_managers=True)