-1

I have a list of objects in my Django template.Each object can be selected and added to a list. I need to send the list to the next template. How can i send the list to the next template? Thankful.

sonia
  • 25
  • 4

2 Answers2

1

if your list is in html you can add a input hidden for each element. if your list is a json array you can send by post using ajax

  • I have sent it by post using ajax but the problem is that by using ajax the new template won't get loaded.how can i solve this?thanks @Cesar Abel Ramirez – sonia Jan 13 '21 at 08:01
  • you receive the request and put de data in the context and return the new rendered template – Cesar Abel Ramirez Jan 13 '21 at 09:18
1

I think you can use this question which has a nice answer : redirect to new page

Farzan
  • 198
  • 2
  • 11