Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

221
Views
How can I display individual products on my page

I just started full stack development and I'm currently working with node, js and django. On my home page I have 2 products(express) but when I click on an individual product I get redirected to a blank page and I'm not sure why

Here is my code for individual product

window.onload = ()=>{
    let params = window.location.search;
  let urlParams = new URLSearchParams(params);
  let productID = urlParams.get("id");
  // http://127.0.0.1:8000/api/products/id 
  if(productID != null && typeof(productID)!= 'undefined'){
      fetch('http://127.0.0.1:8000/api/products/'+productID)
      .then(resp => resp.json())
      .then(data => {
          console.log(data);
          if('detail' in data){
              // display some generic product not found error
          }
          else{
              let name = data['name'];
              let desc = data['description'];
              let price = data['price'];
              let image= data['image'];
                            // display the product data 
                            
          }
      });
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!