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)
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)
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)