0π
β
Had the same problem. Although i dont think this is the best way, try http://127.0.0.1:8000/recommend_product
π€04k
1π
I would guess itβs something to do with how Django processes requests.
Your url is only defined as var url = '/recommend_product/'
, so it may be going to '127.0.0.1:8000/store/recommend_product/'
by default if /store
is your first defined url path.
Edit: To correct it, be more specific with your url
var url = 'http://127.0.0.1:8000/recommend_product/'
π€BStarcheus
- [Answered ]-Could not resolve URL for hyperlinked relationship
- [Answered ]-Django templates url parse error
- [Answered ]-List Box Django Forms
- [Answered ]-Django relay filter not working for foreign key field
0π
I had a similar error on my projects.
Your best bet might be to use javascript, as in ${window.location.host}/your_endpoint/
.
This would make it quite dynamic.
π€Zedtek
- [Answered ]-How to show two tables inline in django admin?
- [Answered ]-Django admin directory on Debian
- [Answered ]-Django "if request.method == 'POST':" returns False
Source:stackexchange.com