def make_api_project(project_data):
 from readthedocs.projects.models import Project
 for key in ['users', 'resource_uri', 'absolute_url', 'downloads', 'main_language_project', 'related_projects']:
  if (key in project_data):
   del project_data[key]
 project = Project(**project_data)
 project.save = _new_save
 return project

def make_api_project ( project_data ) : from readthedocs . projects . models import Project for key in [ 'users' , 'resource_uri' , 'absolute_url' , 'downloads' , 'main_language_project' , 'related_projects' ] : if ( key in project_data ) : del project_data [ key ] project = Project ( ** project_data ) project . save = _new_save return project
make mock project instance from api return .