예제 #1
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),
        )
        raise HTTPError(httplib.NOT_ACCEPTABLE)

    add_poster_by_email(conference=conference, message=message)
예제 #2
0
파일: views.py 프로젝트: kmjungersen/osf.io
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),
        )
        raise HTTPError(httplib.NOT_ACCEPTABLE)

    add_poster_by_email(conference=conference, message=message)
예제 #3
0
파일: views.py 프로젝트: felliott/osf.io
 def dispatch(self, request, *args, **kwargs):
     endpoint = self.kwargs.get("endpoint")
     try:
         self.conf = Conference.get_by_endpoint(endpoint, active=False)
     except ConferenceError:
         raise Http404('Meeting with endpoint "{}" not found'.format(endpoint))
     return super(MeetingFormView, self).dispatch(request, *args, **kwargs)
예제 #4
0
파일: views.py 프로젝트: scooley/osf.io
 def dispatch(self, request, *args, **kwargs):
     endpoint = self.kwargs.get('endpoint')
     try:
         self.conf = Conference.get_by_endpoint(endpoint, active=False)
     except ConferenceError:
         raise Http404(
             'Meeting with endpoint "{}" not found'.format(endpoint))
     return super(MeetingFormView, self).dispatch(request, *args, **kwargs)