def post(self):
        """ Set Featured Speaker in Memcache. """
        speaker = self.request.get('speaker')
        wsck = self.request.get('wsck')

        ConferenceApi._cacheFeaturedSpeaker(speaker, wsck)
        self.response.set_status(204)
示例#2
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     # call the _cacheFeaturedSpeaker method passing in
     # required arguments from the request
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('sessionSpeaker'))
示例#3
0
 def post(self):
     """Set FeaturedSpeaker in Memcache."""
     # add session to speaker
     ConferenceApi._setFeaturedSpeaker(self.request)
     # cache featured speaker
     ConferenceApi._cacheFeaturedSpeaker()
     self.response.set_status(204)
示例#4
0
 def post(self):
     """Set featured speaker sessions message in memcache."""
     # use _cacheFeaturedSpeaker to set announcement in Memcache, passing
     # the request objects 'speaker' and 'wsck' (websafeConferenceKey) as args.
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('speaker'), self.request.get('wsck'))
     self.response.set_status(204)
示例#5
0
 def post(self):
     """Check if speakers in session are featured."""
     print "searching Featuring Speaker"
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('sessionId'))
     self.response.set_status(204)
示例#6
0
 def get(self):
     """Get featured speaker"""
     ConferenceApi._cacheFeaturedSpeaker(
         # self.request.get('websafeSessionKey')
         self.request.get('sessionKey')
         )
     self.response.set_status(204)
示例#7
0
 def post(self):
     """Check if speakers in session are featured."""
     print "searching Featuring Speaker"
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('sessionId'))
     self.response.set_status(204)
示例#8
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     # call the _cacheFeaturedSpeaker method passing in
     # required arguments from the request
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'), 
         self.request.get('sessionSpeaker'))
 def get(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('speaker')
         )
     self.response.set_status(204)
示例#10
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('speaker')
     )
     self.response.set_status(204)
 def get(self):
     """Set Featured Speaker in Memcache"""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('speaker'),
         self.request.get('conference_key')
     )
     self.response.set_status(204)
示例#12
0
 def post(self):
     """Set Speaker Announcement in Memcache.
     Switch from get to post when copying the announcment handler"""
     speaker = self.request.get('speaker')
     conf_key = self.request.get('conf_key')
     ConferenceApi._cacheFeaturedSpeaker(speaker, conf_key)
     self.response.set_status(204)
    def get(self):
        """Set Featured Speaker in Memcache."""
        websafeConferenceKey= self.request.get('websafeConferenceKey')
        speaker = self.request.get('speaker')
        
        #print "So the Speaker is %s and the key is %s" %(speaker,websafeConferenceKey)

        ConferenceApi._cacheFeaturedSpeaker(websafeConferenceKey,speaker)
示例#14
0
    def get(self):
        """Set Featured Speaker in Memcache."""
        websafeConferenceKey = self.request.get('websafeConferenceKey')
        speaker = self.request.get('speaker')

        #print "So the Speaker is %s and the key is %s" %(speaker,websafeConferenceKey)

        ConferenceApi._cacheFeaturedSpeaker(websafeConferenceKey, speaker)
 def post(self):
     # WHY DOES THIS NEED TO BE 'POST' AND NOT 'GET'
     # AREN'T WE JUST 'CALLING' A URL HERE
     """Set Featured Speaker."""
     wsck = self.request.get('confKey')
     speaker = self.request.get('speaker')
     ConferenceApi._cacheFeaturedSpeaker(wsck, speaker)
     self.response.set_status(204)
示例#16
0
 def get(self):
     """Set Featured Speaker in Memcache"""
     #logging.info("This is the websafeConferenceKey: " + self.request.get('websafeConferenceKey'))
     #logging.info("This is the speaker: " + self.request.get('speaker'))
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),          
         self.request.get('speaker')
     )
     self.response.set_status(204)
示例#17
0
 def post(self):
     """Check speaker of last added session"""
     speaker = self.request.get('speaker')
     c_key = self.request.get('wsckey')
     try:
         q = Session.query(ancestor=ndb.Key(urlsafe=c_key))
         q = q.filter(Session.speaker == speaker)
         sessions = q.fetch()
     except ProtocolBufferDecodeError:
         sessions = []
     if len(sessions) > 1:
         ConferenceApi._cacheFeaturedSpeaker(speaker, sessions)
     self.response.set_status(204)
示例#18
0
 def post(self):
     """Find speakers with more than one session at a conference"""
     websafe_speaker_key = self.request.get('websafe_speaker_key')
     wsck = self.request.get('wsck')
     conf_sessions = ConferenceApi._getConferenceSessions(wsck)
     if conf_sessions:
         filtered_sessions, speaker_name = (
             (ConferenceApi._filterSessionsBySpeaker(
                 conf_sessions, websafe_speaker_key)))
         number_of_sessions = filtered_sessions.count()
         if number_of_sessions >= 2:
             session_name = self.request.get('session_name')
             ConferenceApi._cacheFeaturedSpeaker(session_name, speaker_name)
示例#19
0
 def post(self):
     wsck = self.request.get('websafeConferenceKey')
     speaker = self.request.get('speaker')
     # Set new featured speaker in memcache if necessary
     sessions = ConferenceApi._cacheFeaturedSpeaker(wsck, speaker)
     if sessions.count() >= 2:
         memcache.set(key="featuredSpeaker_" + wsck, value=speaker)
示例#20
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(
                     self.request.get("speaker_email"),
                     self.request.get("wsck"))
 def post(self):
     """Send email confirming Conference/Session creation."""
     speaker = self.request.get('speaker')
     entry = self.request.get('content')
     ConferenceApi._cacheFeaturedSpeaker(speaker, entry)
示例#22
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(self.request)
     self.response.set_status(204)
示例#23
0
 def post(self):
     speaker = self.request.get('speaker')
     wsck = self.request.get('websafeConferenceKey')
     ConferenceApi._cacheFeaturedSpeaker(speaker, wsck)
     self.response.set_status(204)
示例#24
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(
         websafeConferenceKey=self.request.get('websafeConferenceKey'),
         websafeSpeakerKey=self.request.get('websafeSpeakerKey')
     )
示例#25
0
 def post(self):
     """Set featured speaker announcement in Memcache"""
     # passing Session web key
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('sess_wkey'))
     self.response.set_status(204)
示例#26
0
 def post(self):
     """Assign a speaker that speaks in more than one session to memcache"""
     ConferenceApi._cacheFeaturedSpeaker(self)
     self.response.set_status(204)
示例#27
0
 def post(self):
     """Set Featured Speaker in Memcache"""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('speaker')
     )
示例#28
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     wssk = self.request.get('session')
     ConferenceApi._cacheFeaturedSpeaker(wssk)
示例#29
0
 def post(self):
     """Set Feature Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(self.request.get('confKey'),
                                         self.request.get('sessionKey'),
                                         self.request.get('speakerId'))
示例#30
0
 def post(self):
     wsck = self.request.get("websafeConferenceKey")
     ConferenceApi._cacheFeaturedSpeaker(wsck)
     self.response.set_status(204)
示例#31
0
 def post(self):
     """Check to see if the speaker is now the featured speaker and update memcache if so."""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('speaker'))
 def post(self):
     """Sets featued speaker for given conference"""
     confKey = self.request.get('websafeConferenceKey')
     speakerName = self.request.get('speaker_name')
     ConferenceApi._cacheFeaturedSpeaker(confKey, speakerName)
示例#33
0
 def post(self):
     """Set Featured Speaker in memcache"""
     confKey = self.request.get('conferenceKey')
     speaker = self.request.get('sessionSpeaker')
     ConferenceApi._cacheFeaturedSpeaker(confKey, speaker)
示例#34
0
 def post(self):
     """Set featured speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(self.request)
     self.response.set_status(204)
 def post(self):
     """Set Featured Speaker in Memcache."""
     data = {'conferenceKey': self.request.get('conferenceKey'),
             'speaker': self.request.get('speaker')}
     ConferenceApi._cacheFeaturedSpeaker(data)
     self.response.set_status(204)
示例#36
0
文件: main.py 项目: yoavitl/Udacity
 def post(self):
     """Check to see if the speaker is now the featured speaker and update memcache if so."""  # noqa
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get("websafeConferenceKey"), self.request.get("speaker")
     )  # noqa
示例#37
0
 def post(self):
     """Set Featured Speaker in Memcache"""
     speaker = self.request.get('speaker')
     conference_key = self.request.get('conference_key')
     ConferenceApi._cacheFeaturedSpeaker(speaker, conference_key)
     self.response.set_status(204)
示例#38
0
文件: main.py 项目: skh/skhonference
 def post(self):
     """Set Featured Speaker in Memcache"""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('websafeSpeakerKey'))
示例#39
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(self.request.get("speaker_email"),
                                         self.request.get("wsck"))
示例#40
0
    def post(self):
        """Set Announcement in Memcache."""

        featspeak = self.request.get('speaker')
        ConferenceApi._cacheFeaturedSpeaker(featspeak)
示例#41
0
 def post(self):
     """Set the current featured speaker."""
     ConferenceApi._cacheFeaturedSpeaker(self.request.get('speaker'),
         self.request.get('conferenceKey'))        
示例#42
0
 def post(self):
     """Set Featured Speaker in memcache."""
     message = self.request.get('data')
     ConferenceApi._cacheFeaturedSpeaker(message)
     self.response.set_status(204)
示例#43
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     speakerName = self.request.get('speakerName')
     confkey = self.request.get('conferenceKey')
     ConferenceApi._cacheFeaturedSpeaker(speakerName, confkey)
     self.response.set_status(204)
示例#44
0
 def post(self):
     """Set Featured Speaker in Memcahce."""
     ConferenceApi._cacheFeaturedSpeaker(self.request.get('speaker'))
     self.response.set_status(204)
示例#45
0
 def post(self):
     """Set Featured Speaker in Memcache."""
     wssk = self.request.get('session')
     ConferenceApi._cacheFeaturedSpeaker(wssk)
示例#46
0
 def get(self):
     """Set featured speaker in Memcache"""
     ConferenceApi._cacheFeaturedSpeaker(
         self.request.get('websafeConferenceKey'),
         self.request.get('speaker'))
示例#47
0
 def post(self):
     """Assign a speaker that speaks in more than one session to memcache"""      
     ConferenceApi._cacheFeaturedSpeaker(self)
     self.response.set_status(204)
 def post(self):
     """Set featured speaker in Memcache."""
     ConferenceApi._cacheFeaturedSpeaker(self.request.get('speakerName'))
     self.response.set_status(204)
示例#49
0
 def post(self):
     """ Set featured speaker in Memcache """
     ConferenceApi._cacheFeaturedSpeaker(self.request.get('sessionKey'), self.request.get('conferenceKey'))
     self.response.set_status(204)
示例#50
0
文件: main.py 项目: Taiyi/Conference
 def post(self):
     speaker = self.request.get('speaker')
     ConferenceApi._cacheFeaturedSpeaker(speaker)
     self.response.set_status(204)