"""This file contains the exception used in courseware access"""fromdjango.httpimportHttp404classCoursewareAccessException(Http404):""" Exception for courseware access errors """def__init__(self,access_response):super(CoursewareAccessException,self).__init__()self.access_response=access_responseself.message="Course not found."defto_json(self):""" Creates a serializable JSON representation of an CoursewareAccessException. Returns: dict: JSON representation """returnself.access_response.to_json()