def _save_request_status(request, key, status):
 session_status = request.session.get('import_status')
 if (session_status is None):
  session_status = request.session.setdefault('import_status', {})
 session_status[key] = status
 request.session.save()

def _save_request_status ( request , key , status ) : session_status = request . session . get ( 'import_status' ) if ( session_status is None ) : session_status = request . session . setdefault ( 'import_status' , { } ) session_status [ key ] = status request . session . save ( )
save import status for a course in request session .