[Answered ]-Django: syntax of return HttpResponseRedirect

2👍

It is a simple python string formatting issue:

'/labels/get/%s/%s/' % store_id, order_id

should be

'/labels/get/%s/%s/' % (store_id, order_id)

Since there are 2 arguments the string is expecting, you need to specify the arguments as a tuple.

So, the response would look like this:

return HttpResponseRedirect('/labels/get/%s/%s/' % (store_id, order_id))

Leave a comment