コード例 #1
0
ファイル: resources.py プロジェクト: wkral/scrwall.com
 def post(self):
     try:
         fb_obj = json.loads(self.request.body)
         fb = feedback.create(fb_obj['comment'], fb_obj['name'], fb_obj['email'])
         self.respond_created(feedback_uri(fb))
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
コード例 #2
0
 def post(self):
     try:
         fb_obj = json.loads(self.request.body)
         fb = feedback.create(fb_obj['comment'], fb_obj['name'],
                              fb_obj['email'])
         self.respond_created(feedback_uri(fb))
     except ValueError:
         self.respond_bad_request('Request did not contain valid JSON')
コード例 #3
0
 def setup(self):
     self.fb1 = feedback.create('William', '*****@*****.**', 'This is a test comment')
     self.fb2 = feedback.create('Blaine', '*****@*****.**', 'This is another test comment')
コード例 #4
0
 def setup(self):
     self.fb1 = feedback.create('William', '*****@*****.**',
                                'This is a test comment')
     self.fb2 = feedback.create('Blaine', '*****@*****.**',
                                'This is another test comment')