Exemplo n.º 1
0
 def validate_access_token(self, field):
     try:
         canvas_course = CanvasCourse()
         self.populate_canvas_course(canvas_course)
         canvas_api.get_course(canvas_course)
     except requests.exceptions.HTTPError as e:
         field.errors.append('Invalid access token')
Exemplo n.º 2
0
 def validate_access_token(self, field):
     try:
         canvas_course = CanvasCourse()
         self.populate_canvas_course(canvas_course)
         canvas_api.get_course(canvas_course)
     except requests.exceptions.HTTPError as e:
         field.errors.append("Invalid access token")