I am trying to send a string generated from javascript tag in my html page to views.py function. I'll use that value to render it to another html page where another javascript will use it.
This is the variable which parses json data:
var url = data.result.docs[i].source.enriched.url.url;
I want to send "url" to my function in views.py but i am not able to figure out a way.
Also i want to keep a link, so that when user click it the "url" is passed to views.py and my function there send it to other html file.
sjd += "<br/>" + data.result.docs[i].source.enriched.url.title +
'<a href="/rawHtmlText/url">' + ' Read more' + '</a>' + '<br>'
This is kind of link i would like to have in my page. I know urls.py should have a proper pattern, but i am not able to figure it out.
May be jQuery can be used but I am a noob in this field so kind of stuck here.
Please guide me.
GET "/rawHtmlText/:url", and you can graburlthere. I'm not familiar with Django, but I'm sure it should have a facility to grab variables from routes.