SHARE
TWEET

Untitled

a guest Jul 16th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     def get(self, request):
  2.  
  3.         client_id = request.query_params.get("id")
  4.  
  5.         client_projects = Project.objects.filter(client=client_id)
  6.         returned_client_projects = []
  7.         for project in client_projects:
  8.             project_dict = {"id": project.id, "project_name": project.project_name}
  9.             returned_client_projects.append(project_dict)
  10.  
  11.         project_technologies = Project.objects.get(client=client_id).technology_stack.all()
  12.         returned_project_technologies = []
  13.         for technology in project_technologies:
  14.             tech_dict = {"id":technology.id, "name":technology.name, "type":technology.type}
  15.             returned_project_technologies.append(tech_dict)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top