Пример #1
0
 def clean_endpoint(self):
     endpoint = self.cleaned_data['endpoint']
     edit = self.cleaned_data['edit']
     try:
         Conference.get_by_endpoint(endpoint, False)
         if not edit:
             raise forms.ValidationError(
                 'A meeting with this endpoint exists already.')
     except ConferenceError:
         if edit:
             raise forms.ValidationError(
                 'Meeting not found with this endpoint to update')
     return endpoint
Пример #2
0
 def clean_endpoint(self):
     endpoint = self.cleaned_data['endpoint']
     edit = self.cleaned_data['edit']
     try:
         Conference.get_by_endpoint(endpoint, False)
         if not edit:
             raise forms.ValidationError(
                 'A meeting with this endpoint exists already.'
             )
     except ConferenceError:
         if edit:
             raise forms.ValidationError(
                 'Meeting not found with this endpoint to update'
             )
     return endpoint
Пример #3
0
def meeting_hook():
    """View function for email conference submission.
    """
    message = ConferenceMessage()

    try:
        message.verify()
    except ConferenceError as error:
        logger.error(error)
        raise HTTPError(httplib.NOT_ACCEPTABLE)

    try:
        conference = Conference.get_by_endpoint(message.conference_name, active=False)
    except ConferenceError as error:
        logger.error(error)
        raise HTTPError(httplib.NOT_ACCEPTABLE)

    if not conference.active:
        send_mail(
            message.sender_email,
            CONFERENCE_INACTIVE,
            fullname=message.sender_display,
            presentations_url=web_url_for('conference_view', _absolute=True),
            can_change_preferences=False,
            logo=settings.OSF_MEETINGS_LOGO,
        )
        raise HTTPError(httplib.NOT_ACCEPTABLE)

    add_poster_by_email(conference=conference, message=message)