Note that there are some explanatory texts on larger screens.

plurals
  1. PORender items in the list returned by a function (view)
    text
    copied!<p>I have links displayed from a list but they are not parsed as 'clickable'</p> <p>my template looks like this:</p> <pre><code> &lt;html&gt; &lt;body&gt; &lt;h2&gt;All listing&lt;/h2&gt; {% for link in name %} &lt;div&gt; &lt;ul&gt; &lt;li&gt; {{ link }}&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; {% endfor %} &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I was hoping the above will return the links as clickable however I only see the raw html as follows:</p> <pre><code>&lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=103536"&gt;Sales Executives needed urgently in Accra&lt;/a&gt; &lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=120007"&gt;Direct Sales Officers&lt;/a&gt; &lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=120010"&gt;Fleet Engineer&lt;/a&gt; &lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=119866"&gt;Business Development Manager&lt;/a&gt; &lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=119846"&gt;Administrative &amp;amp; Accounts Assistant Urgently Needed&lt;/a&gt; &lt;a href="http://www.businessghana.com/portal/jobs/index.php?op=getJobInfo&amp;amp;id=119772"&gt;Quality Control Officer&lt;/a&gt; </code></pre> <p>I was getting what I want when I use HttpResponse to show the links using the view below</p> <pre><code>def businessghana(request): site = "http://www.businessghana.com/portal/jobs" hdr = {'User-Agent' : 'Mozilla/5.0'} req = urllib2.Request(site, headers=hdr) jobpass = urllib2.urlopen(req) soup = BeautifulSoup(jobpass) for tag in soup.find_all('a', href = True): tag['href'] = urlparse.urljoin('http://www.businessghana.com/portal/', tag['href']) html = map(str, soup.find_all('a', href = re.compile('.getJobInfo'))) return HttpResponse(html) </code></pre> <p>but once I added a template, I'm not getting it that way anymore. How can I get my links already parsed as clickable instead of raw html?</p> <p>Thanks in advance and happy holidays to everyone,</p> <p>Max</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload